Methods

Files

Class Index [+]

Quicksearch

ActiveRecord::StaleObjectError

Raised on attempt to save stale record. Record is stale when it’s being saved in another query after instantiation, for example, when two users edit the same wiki page and one starts editing and saves the page before the other.

Read more about optimistic locking in ActiveRecord::Locking module RDoc.

Attributes

record[R]
attempted_action[R]

Public Class Methods

new(record, attempted_action) click to toggle source
     # File lib/active_record/errors.rb, line 104
104:     def initialize(record, attempted_action)
105:       @record = record
106:       @attempted_action = attempted_action
107:     end

Public Instance Methods

message() click to toggle source
     # File lib/active_record/errors.rb, line 109
109:     def message
110:       "Attempted to #{attempted_action} a stale object: #{record.class.name}"
111:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.