class Ransack::Nodes::Condition

def extract_values_for_condition(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)
  unless predicate || Ransack.options[:ignore_unknown_conditions]
    raise ArgumentError, "No valid predicate for #{key}"
  end
  if context.present?
    str = context.ransackable_alias(str)
  end
  combinator =
  if str.match(/_(or|and)_/)
    $1
  else
    nil
  end
  if context.present? && context.attribute_method?(str)
    attributes = [str]
  else
    attributes = str.split(/_and_|_or_/)
  end
  [attributes, predicate, combinator]
end