lib/cancan/model_adapters/active_record_adapter.rb
# parent_id condition can be an array of integer or one integer, we check the parent against this
parent_id condition can be an array of integer or one integer, we check the parent against this
parent_id condition can be an array of integer or one integer we check the parent against this
def nested_subject_matches_conditions?(parent, child, all_conditions)
          id_condition = parent_child_conditions(parent, child, all_conditions)
          return id_condition.include?(parent.id) if id_condition.is_a? Array
          return id_condition == parent.id if id_condition.is_a? Integer
          false
        end
def nested_subject_matches_conditions? ( parent , child , all_conditions ) id_condition = parent_child_conditions ( parent , child , all_conditions ) return id_condition . include? ( parent . id ) if id_condition . is_a? Array return id_condition == parent . id if id_condition . is_a? Integer false end
parent_id condition can be an array of integer or one integer, we check the parent against this
parent_id condition can be an array of integer or one integer we check the parent against this
parent
<not_specific>
child
<not_specific>
all_conditions
<not_specific>