Optimistic Locking in Rails REST APIs
Imagine the following hypothetical scenario: in a rental property management system, Employee A starts editing contact info for Rental X, adding some extra phone numbers. Around the same time, Employee B notices a typo in the contact info for exactly that Rental X and performs an update. A couple of minutes later, Employee A updates Rental X’s contact info with the new phone numbers, and … the update fixing the typo is now gone! That’s definitely not great!