fixes locales issue

This commit is contained in:
Manuel Wiedenmann 2013-06-06 03:18:02 +02:00
parent c2c1961bd0
commit 47405b5b19

View file

@ -8,7 +8,6 @@ module Foodsoft
before_filter :set_locale
end
module InstanceMethods
def explicitly_requested_language
params[:locale]
end
@ -28,7 +27,8 @@ module Foodsoft
protected
def select_language_according_to_priority
explicitly_requested_language || session_language || browser_language
language = explicitly_requested_language || session_language || browser_language
language.to_sym unless language.blank?
end
def available_locales
@ -45,7 +45,6 @@ module Foodsoft
locale = session[:locale] = ::I18n.locale
logger.info("Set locale to #{locale}")
end
end
end
end