don't fail if association conditions aren't specified for nested association check
This commit is contained in:
@@ -104,7 +104,7 @@ module CanCan
|
||||
|
||||
def nested_subject_matches_conditions?(subject_hash)
|
||||
parent, child = subject_hash.shift
|
||||
matches_conditions_hash?(parent, @conditions[parent.class.name.downcase.to_sym])
|
||||
matches_conditions_hash?(parent, @conditions[parent.class.name.downcase.to_sym] || {})
|
||||
end
|
||||
|
||||
def call_block_with_all(action, subject, extra_args)
|
||||
|
||||
Reference in New Issue
Block a user