Flowdock
method

attribute_condition

Importance_0
attribute_condition(quoted_column_name, argument) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

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
Register or log in to add new notes.