instance method
build_where
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v4.2.9 PrivateSignature
build_where(opts, other = [])
No documentation comment.
Parameters
-
optsreq -
otheropt = []
Source
# File activerecord/lib/active_record/relation/query_methods.rb, line 220
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.new(table.engine).build_from_hash(attributes, table)
else
[opts]
end
end
Defined in activerecord/lib/active_record/relation/query_methods.rb line 220
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::QueryMethods