Skip to content

Commit

Permalink
Renames method name in ConditionsMatcher (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietervisser authored Mar 5, 2023
1 parent 08ced0d commit eaddc37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cancan/conditions_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ def matches_conditions_hash?(subject, conditions = @conditions)

def matches_all_conditions?(adapter, subject, conditions)
if conditions.is_a?(Hash)
matches_hash_conditions(adapter, subject, conditions)
matches_hash_conditions?(adapter, subject, conditions)
elsif conditions.respond_to?(:include?)
conditions.include?(subject)
else
subject == conditions
end
end

def matches_hash_conditions(adapter, subject, conditions)
def matches_hash_conditions?(adapter, subject, conditions)
conditions.all? do |name, value|
if adapter.override_condition_matching?(subject, name, value)
adapter.matches_condition?(subject, name, value)
Expand Down

0 comments on commit eaddc37

Please sign in to comment.