pass action and subject through AccessDenied exception when :through isn't found - closes #366

This commit is contained in:
Ryan Bates
2011-05-18 12:58:02 -04:00
parent 74c9d582b2
commit 843fe89c63
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ module CanCan
elsif @options[:shallow]
resource_class
else
raise AccessDenied # maybe this should be a record not found error instead?
raise AccessDenied.new(nil, authorization_action, resource_class) # maybe this should be a record not found error instead?
end
else
resource_class