method
build_where
v3.2.13 -
Show latest stable
- Class:
ActiveRecord::QueryMethods
build_where(opts, other = [])private
No documentation available.
# File activerecord/lib/active_record/relation/query_methods.rb, line 321
def build_where(opts, other = [])
case opts
when String, Array
[@klass.send(:sanitize_sql, other.empty? ? opts : ([opts] + other))]
when Hash
attributes = @klass.send(:expand_hash_conditions_for_aggregates, opts)
PredicateBuilder.build_from_hash(table.engine, attributes, table)
else
[opts]
end
end