Sha256: 5cc6fae8509b99792254c80f09f54a0860fe9460f36df6909d099ac1c3176400

Contents?: true

Size: 295 Bytes

Versions: 5

Compression:

Stored size: 295 Bytes

Contents

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

  def default_url_options
    I18n.locale == I18n.default_locale ? { locale: nil } : { locale: I18n.locale }
  end

  def check_page_name_locale
    redirect_to root_path if current_page.try { name.blank? }
  end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adminos-1.0.0.pre.rc.5 lib/generators/templates/i18n/controller.rb
adminos-1.0.0.pre.rc.4 lib/generators/templates/i18n/controller.rb
adminos-1.0.0.pre.rc.3 lib/generators/templates/i18n/controller.rb
adminos-1.0.0.pre.rc.2 lib/generators/templates/i18n/controller.rb
adminos-1.0.0.pre.rc.1 lib/generators/templates/i18n/controller.rb