class Ransack::Nodes::Condition
def extract(context, key, values)
def extract(context, key, values) attributes, predicate, combinator = extract_values_for_condition(key, context) if attributes.size > 0 && predicate condition = self.new(context) condition.build( :a => attributes, :p => predicate.name, :m => combinator, :v => predicate.wants_array ? Array(values) : [values] ) # TODO: Figure out what to do with multiple types of attributes, # if anything. Tempted to go with "garbage in, garbage out" here. if predicate.validate(condition.values, condition.default_type) condition else nil end end end