diff options
Diffstat (limited to 'lib/alavetelitheme.rb')
-rw-r--r-- | lib/alavetelitheme.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/alavetelitheme.rb b/lib/alavetelitheme.rb index fa2749c..58defaa 100644 --- a/lib/alavetelitheme.rb +++ b/lib/alavetelitheme.rb @@ -5,3 +5,16 @@ class ActionController::Base 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 + + +# Plug theme-specific locale strings +require 'gettext_setup.rb' |