# class ApplicationController

### Protected Instance Methods

default_url_options() click to toggle source

    # File controllers/application_controller.rb, line 15
    def default_url_options
      {locale: I18n.locale}
    end

set_i18n_locale_from_params() click to toggle source

    # File controllers/application_controller.rb, line 5
    def set_i18n_locale_from_params
      if params[:locale]
        if I18n.available_locales.include?(params[:locale].to_sym)
          I18n.locale=params[:locale].to_sym
        else
          flash.now[:notice]= "#{params[:locale]} translation not available"
          logger.error flash.now[:notice]
        end
      end
    end