Permalink
Browse files

moving :alert into redirect_to call in documentation

  • Loading branch information...
1 parent 929579f commit b2028c8aa7d39668614eb455a142bc90748f70d7 @ryanb committed Jan 28, 2011
Showing with 2 additions and 4 deletions.
  1. +1 −2 README.rdoc
  2. +1 −2 lib/cancan/controller_additions.rb
View
@@ -70,8 +70,7 @@ If the user authorization fails, a <tt>CanCan::AccessDenied</tt> 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
@@ -294,8 +294,7 @@ def self.included(base)
#
# 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
#

0 comments on commit b2028c8

Please sign in to comment.