don't stop at cannot definitions when there are no conditions - closes #161

This commit is contained in:
Ryan Bates
2010-10-04 11:11:14 -07:00
parent 12037d7f43
commit 8f49f28713
2 changed files with 9 additions and 1 deletions

View File

@@ -36,7 +36,8 @@ module CanCan
elsif @conditions.kind_of?(Hash) && !subject_class?(subject)
matches_conditions_hash?(subject)
else
@base_behavior
# Don't stop at "cannot" definitions when there are conditions.
@conditions.empty? ? true : @base_behavior
end
end