# File lib/cancan/model_adapters/active_record_adapter.rb, line 12 def self.matches_condition?(subject, name, value) subject_value = subject.send(name.column) if name.method.to_s.ends_with? "_any" value.any? { |v| meta_where_match? subject_value, name.method.to_s.sub("_any", ""), v } elsif name.method.to_s.ends_with? "_all" value.all? { |v| meta_where_match? subject_value, name.method.to_s.sub("_all", ""), v } else meta_where_match? subject_value, name.method, value end end