I have used cancan and i have used
rescue_from CanCan::AccessDenied do |exception|
flash[:error] = "Access denied!"
redirect_to root_url
end
in my application controller but i want to stay on the same page where i perform that action and if possible a pop up window just showing
you are not authorised to perform this action
How to customize so as to stay in the same page wherever the unauthorized action is performed? please help me doing this.