From b2028c8aa7d39668614eb455a142bc90748f70d7 Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Fri, 28 Jan 2011 09:53:07 -0800 Subject: [PATCH] moving :alert into redirect_to call in documentation --- README.rdoc | 3 +-- lib/cancan/controller_additions.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.rdoc b/README.rdoc index ffdf543..78fe3b7 100644 --- a/README.rdoc +++ b/README.rdoc @@ -70,8 +70,7 @@ If the user authorization fails, a CanCan::AccessDenied exception will class ApplicationController < ActionController::Base rescue_from CanCan::AccessDenied do |exception| - flash[:alert] = exception.message - redirect_to root_url + redirect_to root_url, :alert => exception.message end end diff --git a/lib/cancan/controller_additions.rb b/lib/cancan/controller_additions.rb index 5249744..8d0ca25 100644 --- a/lib/cancan/controller_additions.rb +++ b/lib/cancan/controller_additions.rb @@ -294,8 +294,7 @@ module CanCan # # class ApplicationController < ActionController::Base # rescue_from CanCan::AccessDenied do |exception| - # flash[:alert] = exception.message - # redirect_to root_url + # redirect_to root_url, :alert => exception.message # end # end #