I am trying to find a way to display my flash errors on the active page without the redirect_to method.
By the way, the standard flash[:alert] = exception.message didn’t show me any error messages, so I changed it to flash[:error].
Thanks for any advice!
rescue_from CanCan::AccessDenied do |exception|
flash[:error] = exception.message
redirect_to deadlines_path
end
Try:
without a redirect.