You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My application controller has an 'around_action' call to change the locale, but it is breaking the admin cms and keeping the page from rendering, any idea why this is a problem?
class ApplicationController < ActionController::Base
around_action :set_locale
def set_locale(&action)
I18n.with_locale(params[:lang1], &action)
end
..
end
The text was updated successfully, but these errors were encountered:
Late to the party, but out of curiosity, why not set it in general as in I18n.locale = params[:lang1]?
I've personally had difficulties with full request around_actions for setting time zone and locales as you've noticed here. It also messes with the stack trace making debugging difficult in instances.
My application controller has an 'around_action' call to change the locale, but it is breaking the admin cms and keeping the page from rendering, any idea why this is a problem?
The text was updated successfully, but these errors were encountered: