Merge branch 'optional-associations' of https://github.com/socialcast/cancan into socialcast-optional-associations

This commit is contained in:
Ryan Bates
2011-04-01 15:13:02 -07:00
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ module CanCan
if attribute.kind_of? Array
attribute.any? { |element| matches_conditions_hash? element, value }
else
matches_conditions_hash? attribute, value
!attribute.nil? && matches_conditions_hash?(attribute, value)
end
elsif value.kind_of?(Array) || value.kind_of?(Range)
value.include? attribute