aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-01-13 19:18:56 +0000
committerSeb Bacon <seb.bacon@gmail.com>2011-03-10 10:32:11 +0000
commitf09146ff3321c57e1b176d47c6dbe0d58b611c41 (patch)
treeb532ae3bc0ae8c5850cf87878877639968c2c9c2 /app/controllers/application_controller.rb
parent25552b60030dc85c8194b713c76387bb9534af26 (diff)
make site_name a globally available helper
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 0ec8daf0a..c4db7469f 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -27,6 +27,16 @@ class ApplicationController < ActionController::Base
include FastGettext::Translation # make functions like _, n_, N_ etc available)
+ before_filter :set_gettext_locale
+
+ helper_method :site_name
+ def site_name
+ # XXX should come from database:
+ site_name = "WhatDoTheyKnow"
+ return site_name
+ end
+
+
# 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.