Sha256: 2680cd63364694914da38506c8612a7d0dd87c1c9469bf8f496e65314e406720

Contents?: true

Size: 279 Bytes

Versions: 15

Compression:

Stored size: 279 Bytes

Contents

class LocaleController < ApplicationController

  def set
    if params[:locale]
      I18n.locale = params[:locale]
      session[:locale] = params[:locale]
      flash[:notice] = t("locale_changed")
    end
    redirect_to (request.env['HTTP_REFERER'] or root_path)
  end

end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
spree-enriquez-0.9.4 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.9.4 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.9.3 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.9.2 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.9.1 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.9.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.4 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.5 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.6.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.7.1 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.7.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.1 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.2 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.8.3 vendor/extensions/localization/app/controllers/locale_controller.rb