method
new
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::StaleObjectError
new(record = nil, attempted_action = nil)public
No documentation available.
# File activerecord/lib/active_record/errors.rb, line 381
def initialize(record = nil, attempted_action = nil)
if record && attempted_action
@record = record
@attempted_action = attempted_action
super("Attempted to #{attempted_action} a stale object: #{record.class.name}.")
else
super("Stale object error.")
end
end