Sha256: eef62c0ef4e30b476fd2d20ec2f4085024860d0a604a639c64fc1a87a5aa0cb7
Contents?: true
Size: 528 Bytes
Versions: 3
Compression:
Stored size: 528 Bytes
Contents
module Spree class LocaleController < BaseController def set if request.referer && request.referer.starts_with?('http://' + request.host) session['user_return_to'] = request.referer end if params[:locale] && I18n.available_locales.map(&:to_s).include?(params[:locale]) session[:locale] = I18n.locale = params[:locale] flash.notice = t(:locale_changed) else flash[:error] = t(:locale_not_changed) end redirect_back_or_default(root_path) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spree_core-1.2.5 | app/controllers/spree/locale_controller.rb |
spree_core-1.2.4 | app/controllers/spree/locale_controller.rb |
spree_core-1.0.7 | app/controllers/spree/locale_controller.rb |