OK, I have a status called "being_edited when a record is being updated. When this happens I removed the ability to edit the record from the SHOW screen. Ok so I guess if in the edit screeen do not have a navigation link?
On Fri, Apr 17, 2009 at 7:28 PM, Phlip <[email protected]> wrote: > > Me wrote: > > If I am in a form and I am editing it and I have a status of say > > "being edited". If someone were to navigate away say to show all > > forms or something is there a way to update the state of the form? > > That is generally not what a state machine is for. Your states should have > a > wider granularity, and users should push records into new states by > explicitly > submitting forms. > > Even if you wrote an Ajax call in the "onblur" event of your form (if there > is > one), and even if the user's browser did not reject the call as an attempt > to > pop up an ad, your user might simply unplug from the grid suddenly. > > To prevent users from editing the same record, do what Wikis do. Send out > one > form with a timestamp. When the POST comes back, compare the timestamp to > the > record's current stamp. If it has changed, inform the user they should use > the > Back button to retrieve their changes, they should copy them out to a > Notepad, > and then they should refresh their record to see the latest version. > > -- > Phlip > http://flea.sourceforge.net/resume.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 [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 -~----------~----~----~----~------~----~------~--~---

