diff options
| author | hukl <contact@smyck.org> | 2009-02-19 21:57:55 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-19 21:57:55 +0100 |
| commit | 069187aee03481a5b802fe82a7c1fad26a66a876 (patch) | |
| tree | 024571e8e4976077055a33e4e0bea8bd262d4779 /app/controllers/application_controller.rb | |
| parent | 345d9088fb49adee0a8bc182ee76b594e0b753f0 (diff) | |
setting the locale so clean you could eat from it
Diffstat (limited to 'app/controllers/application_controller.rb')
| -rw-r--r-- | app/controllers/application_controller.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b481317..3ee43d4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb | |||
| @@ -9,4 +9,12 @@ class ApplicationController < ActionController::Base | |||
| 9 | 9 | ||
| 10 | # Scrub sensitive parameters from your log | 10 | # Scrub sensitive parameters from your log |
| 11 | filter_parameter_logging :password, :password_confirmation | 11 | filter_parameter_logging :password, :password_confirmation |
| 12 | |||
| 13 | before_filter :set_locale | ||
| 14 | |||
| 15 | protected | ||
| 16 | |||
| 17 | def set_locale | ||
| 18 | I18n.locale = params[:locale] || :en | ||
| 19 | end | ||
| 12 | end | 20 | end |
