lib/cancan/conditions_matcher.rb
# Matches the block or conditions hash
Matches the block or conditions hash
Matches the block or conditions hash
def matches_all_conditions?(adapter, subject, conditions)
      if conditions.is_a?(Hash)
        matches_hash_conditions(adapter, subject, conditions)
      elsif conditions.respond_to?(:include?)
        conditions.include?(subject)
      else
        puts "does #{subject} match #{conditions}?"
        subject == conditions
      end
    end
def matches_all_conditions? ( adapter , subject , conditions ) if conditions . is_a? ( Hash ) matches_hash_conditions ( adapter , subject , conditions ) elsif conditions . respond_to? ( :include? ) conditions . include? ( subject ) else puts "does #{subject} match #{conditions}?" subject == conditions end end
Matches the block or conditions hash
Matches the block or conditions hash
adapter
<not_specific>
subject
<not_specific>
conditions
<not_specific>