aboutsummaryrefslogtreecommitdiffstats
path: root/lib/alavetelitheme.rb
blob: 2ba63cebb8920ab0bc89e07d2563da8af26b1af9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class ActionController::Base
    before_filter :set_view_paths

    def set_view_paths         
        self.prepend_view_path File.join(File.dirname(__FILE__), "views")
    end
end

# In order to have the theme lib/ folder ahead of the main app one,
# inspired in Ruby Guides explanation: http://guides.rubyonrails.org/plugins.html
%w{ . }.each do |dir|
  path = File.join(File.dirname(__FILE__), dir)
  $LOAD_PATH.insert(0, path)
  ActiveSupport::Dependencies.autoload_paths << path
  ActiveSupport::Dependencies.autoload_once_paths.delete(path)
end

# Monkey patch app code
require 'controller_patches.rb'
require 'model_patches.rb'
require 'patch_mailer_paths.rb'

# Extend routes
require 'config/custom-routes.rb'

# Plug theme-specific locale strings
require 'gettext_setup.rb'