class method
self.new
Ruby on Rails 4.1.16
Since v3.2.22.5Signature
self.new(record, attempted_action)
No documentation comment.
Parameters
-
recordreq -
attempted_actionreq
Source
# File activerecord/lib/active_record/errors.rb, line 117
def initialize(record, attempted_action)
super("Attempted to #{attempted_action} a stale object: #{record.class.name}")
@record = record
@attempted_action = attempted_action
end
Defined in activerecord/lib/active_record/errors.rb line 117
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::StaleObjectError