class method
self.attribute_condition
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.3.18 PrivateAvailable in: v2.2.3 v2.3.18
Signature
self.attribute_condition(argument)
No documentation comment.
Parameters
-
argumentreq
Source
# File activerecord/lib/active_record/base.rb, line 1865
def attribute_condition(argument)
case argument
when nil then "IS ?"
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope then "IN (?)"
when Range then "BETWEEN ? AND ?"
else "= ?"
end
end
Defined in activerecord/lib/active_record/base.rb line 1865
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Base