Skip to content

Commit

Permalink
allow to check ability by common module
Browse files Browse the repository at this point in the history
  • Loading branch information
funny-falcon authored and ryanb committed Sep 16, 2010
1 parent f236b1b commit e2c341b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cancan/can_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def matches_subject?(subject)
end

def matches_subject_class?(subject)
@subjects.any? { |sub| sub.kind_of?(Class) && (subject.kind_of?(sub) || subject.kind_of?(Class) && subject.ancestors.include?(sub)) }
@subjects.any? { |sub| sub.kind_of?(Module) && (subject.kind_of?(sub) || subject.kind_of?(Module) && subject.ancestors.include?(sub)) }
end

def matches_conditions_hash?(subject, conditions = @conditions)
Expand Down

0 comments on commit e2c341b

Please sign in to comment.