Skip to content

Commit

Permalink
cancan 2.0 fix for issue ryanb#565; fixes namespaced non-db/model bac…
Browse files Browse the repository at this point in the history
…ked resources authorization
  • Loading branch information
bsodmike committed May 11, 2012
1 parent 167d383 commit 48ed6f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cancan/rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def matches_action?(action)

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)
Expand Down

0 comments on commit 48ed6f9

Please sign in to comment.