Don't remove key-value from the subject hash we might want to use it again.

This commit is contained in:
Florent Piteau
2012-02-29 15:49:19 +01:00
parent 9eebeb2155
commit ba01349eb0
2 changed files with 9 additions and 1 deletions

View File

@@ -123,7 +123,7 @@ module CanCan
end
def nested_subject_matches_conditions?(subject_hash)
parent, child = subject_hash.shift
parent, child = subject_hash.first
matches_conditions_hash?(parent, @conditions[parent.class.name.downcase.to_sym] || {})
end