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 -~----------~----~----~----~------~----~------~--~---

