moving :alert into redirect_to call in documentation
This commit is contained in:
parent
929579f03b
commit
b2028c8aa7
|
@ -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 @@ 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
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user