Sha256: 81f06d1ef7741a4e483b6d537dc80adaed5f6755f19100a55f5bb6d9c4ab46c4
Contents?: true
Size: 530 Bytes
Versions: 25
Compression:
Stored size: 530 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.include?(params[:locale].to_sym) session[:locale] = I18n.locale = params[:locale].to_sym 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
25 entries across 25 versions & 1 rubygems