Frederick Cheung wrote: > On Jul 5, 12:04�pm, Onur Gungor <[email protected]> > wrote: >> Would it be OK to create a model and its corresponding table for just >> locking? i.e. Lock model and locks table. > > That or rails' optimistic locking might be useful. I would usually shy > away from creating a Lock model, it just seems a bit artificial. I > would probably stick a locked_by_foo column on the appropriate model > and use that to tell whether a particular object is being updated (and > use optimistic locking in conjunction with that) > > Fred
Thanks for your response, But as I told in my post replying Marnen, I just don't know which objects to lock (or because there are several of them). So I will use the Lock model approach for now. Thanks for all your answers, Best Onur -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---

