aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-01-13 17:41:44 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-10 10:28:24 +0000
commitcf5b70fe37a35a410cd562d4f7d5653f7d4655cb (patch)
treef88d24a8f96633ffdc6de994ac2a1fe5adba6f73 /app/controllers/application_controller.rb
parentaada4423c317c9483451068f7fd754972d95422f (diff)
top-level gettext functions already available
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 1628d2f31..0ec8daf0a 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -12,6 +12,7 @@
class ApplicationController < ActionController::Base
# Standard headers, footers and navigation for whole site
layout "default"
+
before_filter :set_gettext_locale
# scrub sensitive parameters from the logs
@@ -24,6 +25,8 @@ class ApplicationController < ActionController::Base
return site_name
end
+ include FastGettext::Translation # make functions like _, n_, N_ etc available)
+
# Help work out which request causes RAM spike.
# http://www.codeweblog.com/rails-to-monitor-the-process-of-memory-leaks-skills/
# This shows the memory use increase of the Ruby process due to the request.