method
attribute_condition
attribute_condition(quoted_column_name, argument)
private
Hide source
# File activerecord/lib/active_record/base.rb, line 2027 def attribute_condition(quoted_column_name, argument) case argument when nil then "#{quoted_column_name} IS ?" when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope then "#{quoted_column_name} IN (?)" when Range then if argument.exclude_end? "#{quoted_column_name} >= ? AND #{quoted_column_name} < ?" else "#{quoted_column_name} BETWEEN ? AND ?" end else "#{quoted_column_name} = ?" end end