class

ActiveRecord::PreparedStatementInvalid

v8.0.0 - Show latest stable - Superclass: ActiveRecordError

Raised when the number of placeholders in an SQL fragment passed to {ActiveRecord::Base.where}[rdoc-ref:QueryMethods#where] does not match the number of values supplied.

For example, when there are two placeholders with only one value supplied:

Location.where("lat = ? AND lng = ?", 53.7362)

Files

  • activerecord/lib/active_record/errors.rb