diff options
| author | hukl <contact@smyck.org> | 2010-05-09 11:15:15 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2010-05-09 11:15:15 +0200 |
| commit | 2f66379cf41ed43c18851050f84cf8783c36d458 (patch) | |
| tree | 6fd1f41f5e690971b6963acc2f57d5e99d9e4d0f /app | |
| parent | f637d999653989f9ddf240a233e88e65e1ff022f (diff) | |
filter out invalid locales right away
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/application_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 779193f..bce0c71 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb | |||
| @@ -17,7 +17,7 @@ class ApplicationController < ActionController::Base | |||
| 17 | protected | 17 | protected |
| 18 | 18 | ||
| 19 | def set_locale | 19 | def set_locale |
| 20 | if params[:locale] && I18n.available_locales.include?(params[:locale]) | 20 | if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym) |
| 21 | I18n.locale = params[:locale].to_sym | 21 | I18n.locale = params[:locale].to_sym |
| 22 | else | 22 | else |
| 23 | params.delete(:locale) | 23 | params.delete(:locale) |
