lib/cancan/conditions_matcher.rb
# Matches the block or conditions hash
Matches the block or conditions hash
Matches the block or conditions hash
def nested_subject_matches_conditions?(subject_hash)
      parent, child = subject_hash.first
      matches_base_parent_conditions = matches_conditions_hash?(parent,
                                                                @conditions[parent.class.name.downcase.to_sym] || {})
      adapter = model_adapter(parent)
      matches_base_parent_conditions &&
        (!adapter.override_nested_subject_conditions_matching?(parent, child, @conditions) ||
          adapter.nested_subject_matches_conditions?(parent, child, @conditions))
    end
def nested_subject_matches_conditions? ( subject_hash ) parent , child = subject_hash . first matches_base_parent_conditions = matches_conditions_hash? ( parent , @conditions [ parent . class . name . downcase . to_sym ] || { } ) adapter = model_adapter ( parent ) matches_base_parent_conditions && ( ! adapter . override_nested_subject_conditions_matching? ( parent , child , @conditions ) || adapter . nested_subject_matches_conditions? ( parent , child , @conditions ) ) end
Matches the block or conditions hash
Matches the block or conditions hash
subject_hash
<not_specific>