demarches-normaliennes/app/controllers/application_controller.rb

24 lines
683 B
Ruby
Raw Normal View History

2015-08-10 11:05:06 +02:00
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
2015-09-22 10:15:12 +02:00
# before_action :store_location
2015-08-10 11:05:06 +02:00
2015-09-22 10:15:12 +02:00
# def store_location
# unless params[:controller] == 'devise/sessions'
# url = "/admin/dossiers/#{params[:dossier_id]}"
# session[:user_return_to] = url
# end
# end
2015-08-10 11:05:06 +02:00
2015-09-22 10:15:12 +02:00
# def stored_location_for(resource_or_scope)
# session[:user_return_to] || super
# end
2015-08-10 11:05:06 +02:00
2015-09-22 10:15:12 +02:00
# def after_sign_in_path_for(resource)
# puts "========================= coucou #{resource}"
# stored_location_for(resource) || root_path
# end
2015-08-10 11:05:06 +02:00
end