Sha256: 62b4d37666b8f93ef0ce770fc56ae255ac803015314635d50fc5d540ac3e39b2

Contents?: true

Size: 279 Bytes

Versions: 4

Compression:

Stored size: 279 Bytes

Contents

class LocaleController < ApplicationController

  def set
    if params[:locale]
      Locale.code = 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

4 entries across 4 versions & 1 rubygems

Version Path
spree-0.4.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.4.1 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.5.0 vendor/extensions/localization/app/controllers/locale_controller.rb
spree-0.5.1 vendor/extensions/localization/app/controllers/locale_controller.rb