Philip Nelson
2007-Sep-05 13:00 UTC
Rails Convention for "Record Pseudo Locking" on Multi-User Systems
We are writing an order processing system, where we will display a list of orders for clerks to process. Obviously we don''t want two people working on the same order. In other systems we''ve put a LOCKED_BY column in the database which is set on entering the edit screen and unset on saving. But is there a Rails convention, or Rails way, for doing this (before we go off and write our own code) ? Thanks Phil Nelson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gene.tani-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Sep-05 13:10 UTC
Re: Rails Convention for "Record Pseudo Locking" on Multi-User Systems
On Sep 5, 6:00 am, Philip Nelson <sco...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> We are writing an order processing system, where we will display a list of > orders for clerks to process. Obviously we don''t want two people working on > the same order. In other systems we''ve put a LOCKED_BY column in the > database which is set on entering the edit screen and unset on saving. > > But is there a Rails convention, or Rails way, for doing this (before we go > off and write our own code) ? > > Thanks > > Phil Nelsonrace conditions: you want to investigate optimistic and pessimistic locking and transactions: http://api.rubyonrails.com/classes/ActiveRecord/Locking.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---