diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 10:24:50 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-21 10:24:50 +0100 |
commit | fb48cc3b7400f73c01d59a038eaf7fc3020c39f4 (patch) | |
tree | 8c438fdf1cfc61a7292115b7787b46b9280a5d1b /app/controllers | |
parent | e616ffc5d60acafb67dadf90e396226d408d0cda (diff) |
Desktop notifications
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index f9aeb127a..3a4c95db4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,7 +13,7 @@ class ApplicationController < ActionController::Base rescue_from ActiveRecord::RecordNotFound, with: :not_found before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? - before_action :set_locale, if: 'user_signed_in?' + before_action :set_locale def raise_not_found raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}" @@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base end def set_locale - I18n.locale = current_user.locale || I18n.default_locale + I18n.locale = current_user.try(:locale) || I18n.default_locale rescue I18n::InvalidLocale I18n.locale = I18n.default_locale end |