rails / 6.1.1 / activerecord / preparedstatementinvalid.html /

class ActiveRecord::PreparedStatementInvalid

Parent:
ActiveRecord::ActiveRecordError

Raised when the number of placeholders in an SQL fragment passed to ActiveRecord::Base.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)

© 2004–2020 David Heinemeier Hansson
Licensed under the MIT License.