what's solving your problem is a mutual exclusion (called Mutex). you can try google/wiki to learn more about threading and mutex.
easy to implement: class Document < ActiveRecord::Base include 'Mutex_m' ... look here and check out the synchronize method: http://noobkit.com/show/ruby/ruby/standard-library/mutex_m.html hope this helps. On 28 Okt., 01:02, shagymoe <[EMAIL PROTECTED]> wrote: > > What about a find using :first and :order by version descending to limit > > what you have to process... > > I think two queries at the same time would still return the same > version. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---