method

quote_bound_value

quote_bound_value(connection, value)
private

No documentation available.

# File activerecord/lib/active_record/sanitization.rb, line 233
        def quote_bound_value(connection, value)
          if value.respond_to?(:map) && !value.acts_like?(:string)
            values = value.map { |v| v.respond_to?(:id_for_database) ? v.id_for_database : v }
            if values.empty?
              connection.quote(connection.cast_bound_value(nil))
            else
              values.map! { |v| connection.quote(connection.cast_bound_value(v)) }.join(",")
            end
          else
            value = value.id_for_database if value.respond_to?(:id_for_database)
            connection.quote(connection.cast_bound_value(value))
          end
        end