24 Jul '12, 7pm

Great post explaining how to implement optimistic locking with ActiveRecord.

Great post explaining how to implement optimistic locking with ActiveRecord.

While this behavior is helpful, it doesn’t solve a more worrisome problem. Let’s say Billy comes to change that same vacation destination. He opens up the edit form, bangs away at the content and walks away to get some coffee. He gets distracted and doesn’t come back to work on it for a few hours. While he’s away, Jenny makes a quick change to the destination. He comes back and finishes the content changes and submits the edit form. What happens? Well, with optimistic locking out of the box, his changes succeed and go through to the database. This is problematic for me, and is not what I would expect. This happens because the lock_version is set from the database when you instantiate the model object inside the update action. What we need is the model to be locked for Billy to the version he has when he accesses the edit form. The best way to accomplish this is by adding a...

Full article: http://www.engineyard.com/blog/2011/a-guide-to-optimistic...

Tweets

Looking at Lithium #li3

engineyard.com 25 Jul '12, 7pm

In the announcement , Elizabeth told us about a little Lithium and why Engine Yard chose to sponsor the project. In this p...

Episode 59: Optimistic Locking (revised)

railscasts.com 05 Aug '12, 1am

There is a chance one user will unintentionally override someone else's changes if they update a record near the same time...

Locking of a Domain Name Subject to UDRP Procee...

icann.org 25 Jul '12, 6pm

The Generic Names Supporting Organization (GNSO ) Locking of a Domain Name Subject to UDRP Proceedings Working Group is lo...

@langalex and

@langalex and

engineyard.com 30 Jul '12, 2pm

We use Ilya Grigorik’s em-proxy to fork traffic in real time from our production environment to a load testing environment...

Cucumber: More Advanced | Engine Yard Blog:

engineyard.com 21 Jul '12, 6pm

, I gave you some introductory information on Cucumber, a great framework for writing and executing high level description...

Despite Q2 Loss, Tesla Forecast Optimistic

Despite Q2 Loss, Tesla Forecast Optimistic

hybridcars.com 26 Jul '12, 9pm

Yet despite the better than expected performance and Tesla stating that it is still on track to produce 5,000 Model S orde...