Merge 0257c73176 into e11ad83b32
This commit is contained in:
commit
efbab7f159
10 changed files with 775 additions and 116 deletions
|
|
@ -3,6 +3,16 @@ class ApplicationController < ActionController::Base
|
|||
protect_from_forgery
|
||||
before_filter :get_conferences
|
||||
before_filter :store_location
|
||||
before_action :set_locale
|
||||
|
||||
def set_locale
|
||||
I18n.locale = params[:locale] || I18n.default_locale
|
||||
end
|
||||
|
||||
def default_url_options(options={})
|
||||
logger.debug "default_url_options is passed options: #{options.inspect}\n"
|
||||
{ :locale => ((I18n.locale == I18n.default_locale) ? nil : I18n.locale) }
|
||||
end
|
||||
|
||||
def store_location
|
||||
session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue