allow to check ability by common module
This commit is contained in:
parent
f236b1b5a4
commit
e2c341b8d3
|
@ -91,7 +91,7 @@ module CanCan
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user