I'm working on the database locking to ensure the safe data transactions in a multi-user participation.
The machine is installed with Passenger.
After I added the 'lock_version'(integer), the record no long is able to be modified through console.
Let's say,
lesson = Lesson.find(1)
lesson.start_time = Time.now
lesson.save
=> then, ActiveRecord::StaleObjectError: Attempted to update a stale object: Lesson
But, with a very rare chance, a column is saved, which makes me confused a lot.
The rails version is 4.2.8
Many thanks over many thoughts..!
Best