Skip to content

How To: Redirect with locale after authentication failure

Skieloch edited this page Jul 27, 2011 · 2 revisions

Set your locale & Make your default_url_options a class method in your ApplicationController

    def set_locale
      I18n.locale = params[:locale]
    end

    def self.default_url_options(options={})
      options.merge({ :locale => I18n.locale })
    end
Clone this wiki locally