W3cubDocs

/Ruby on Rails 7.0

class ActiveRecord::StatementInvalid

Parent:
ActiveRecord::ActiveRecordError

Superclass for all database execution errors.

Wraps the underlying database error as cause.

Attributes

binds[R]
sql[R]

Public Class Methods

new(message = nil, sql: nil, binds: nil) Show source
# File activerecord/lib/active_record/errors.rb, line 159
def initialize(message = nil, sql: nil, binds: nil)
  super(message || $!&.message)
  @sql = sql
  @binds = binds
end
Calls superclass method

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