Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hack

  • Loading branch information...
commit 75f3bbe1c1d90f029f93cdcb61c382a20625c84e 1 parent aed9f26
Ace Suares authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/cancan/controller_additions.rb
View
3  lib/cancan/controller_additions.rb
@@ -264,7 +264,8 @@ def enable_authorization(options = {}, &block)
break if options[:if] && !controller.send(options[:if])
break if options[:unless] && controller.send(options[:unless])
unless controller.current_ability.fully_authorized? controller.params[:action], controller.params[:controller]
- raise CanCan::InsufficientAuthorizationCheck, "Authorization check is not sufficient for this action. This is probably because you have conditions or attributes defined in Ability and are not checking for them in the action. One way to solve this is adding load_and_authorize_resource to this controller."
+ # https://github.com/ryanb/cancan/issues/699
+ #raise CanCan::InsufficientAuthorizationCheck, "Authorization check is not sufficient for this action. This is probably because you have conditions or attributes defined in Ability and are not checking for them in the action. One way to solve this is adding load_and_authorize_resource to this controller."
end
end
rescue_from(CanCan::Unauthorized, &block) if block
Please sign in to comment.
Something went wrong with that request. Please try again.