cancan 2.0 fix for issue #565; fixes namespaced non-db/model backed resources authorization

This commit is contained in:
Michael de Silva 2012-03-03 00:36:51 +03:00
parent 167d3832fc
commit 48ed6f9353

View File

@ -100,7 +100,7 @@ module CanCan
def matches_subject?(subject)
subject = subject_name(subject) if subject_object? subject
@expanded_subjects.include?(:all) || @expanded_subjects.include?(subject.to_sym) # || matches_subject_class?(subject)
@expanded_subjects.include?(:all) || @expanded_subjects.include?(subject.to_sym) || @expanded_subjects.include?(subject) # || matches_subject_class?(subject)
end
def matches_attribute?(attribute)