Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Merge fcc55cc into f6e8ada
Browse files Browse the repository at this point in the history
  • Loading branch information
JPrevost committed Mar 17, 2016
2 parents f6e8ada + fcc55cc commit 299d3a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ 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
before_filter :store_current_location, :unless => :devise_controller?

def store_current_location
store_location_for(:user, request.url)
end

rescue_from CanCan::AccessDenied do |exception|
redirect_to root_url, alert: exception.message
Expand Down

0 comments on commit 299d3a9

Please sign in to comment.