aboutsummaryrefslogtreecommitdiffstats
path: root/lib/alavetelitheme.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-27 13:15:34 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-27 13:15:34 +0000
commit7a758a657e10c5b6a11355c9dad205178342096f (patch)
treef83cccdf28c68697966420c183259dd6aa6ac06b /lib/alavetelitheme.rb
parentece7981356e8b5dc9dd81a34b54f0666a81a462b (diff)
Add examples of how a user might customise:
* routes * gettext translations * categories
Diffstat (limited to 'lib/alavetelitheme.rb')
-rw-r--r--lib/alavetelitheme.rb13
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'