ActionController::Base
# File app/controllers/application_controller.rb, line 29 def after_sign_in_path_for(resource) sign_in_url = new_user_session_path(:only_path => false, :protocol => 'http') if request.referer == sign_in_url super else stored_location_for(resource) || root_path end end
# File app/controllers/application_controller.rb, line 68 def current_ability @current_ability ||= Ability.new(current_user, request, params[:key]) end
# File app/controllers/application_controller.rb, line 71 def default_url_options {locale: nil, theme: nil , ansicht: nil} # I18n.locale end
# File app/controllers/application_controller.rb, line 58 def get_theme u=current_user if ! u.try(:preferredtheme).nil? and ThemesForRails.available_theme_names.include?(u.preferredtheme) u.preferredtheme else "blue2" end end
# File app/controllers/application_controller.rb, line 8 def set_i18n_locale_from_params if params[:locale] if I18n.available_locales.include?(params[:locale].to_sym) session[:locale] = params[:locale] else flash.now[:notice]= "#{params[:locale]} translation not available" logger.error flash.now[:notice] end end http_header=request.env['HTTP_ACCEPT_LANGUAGE'] unless http_header.nil? ht= http_header.scan(/^de|en/).first else ht=nil end I18n.locale = session[:locale] || I18n.default_locale # removed ht from selection add || ht to check http header session[:locale] = I18n.locale end
Generated with the Darkfish Rdoc Generator 2.