Skip to content

Commit

Permalink
Rename private method as it now extracts all condition values.
Browse files Browse the repository at this point in the history
Follow-up to #623.
  • Loading branch information
jonatack committed Dec 19, 2015
1 parent 1de3453 commit f225843
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ransack/nodes/condition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ class Condition < Node

class << self
def extract(context, key, values)
attributes, predicate, combinator = extract_attributes_and_predicate(key, context)
attributes, predicate, combinator =
extract_values_for_condition(key, context)

if attributes.size > 0 && predicate
condition = self.new(context)
Expand All @@ -31,7 +32,7 @@ def extract(context, key, values)

private

def extract_attributes_and_predicate(key, context = nil)
def extract_values_for_condition(key, context = nil)
str = key.dup
name = Predicate.detect_and_strip_from_string!(str)
predicate = Predicate.named(name)
Expand Down

0 comments on commit f225843

Please sign in to comment.