Nothing really but the people who use this will most likely not know how to do that. Is there a better way to prevent someone from editing a form while someone else has it open? I saw something about optimistic locking but not quite sure what it really is or how to use it.
On Fri, Apr 17, 2009 at 10:55 PM, Darrik Mazey <[email protected]>wrote: > > Phlip wrote: > > Chris Habgood wrote: > > > >> I just do this in my application.html page: > >> > >> <% unless @mop.state.eql?("Being_Edited") %> > >> <%= link_to "New Mop", :action => "new" %></h3></td> > >> <%= link_to "Review Mop", :action => "review" %></h3></td> > >> <% end %> > >> > >> Same thing really for the Show page, I just put an unless condition to > >> remove the "edit" link if the mop is being edited or looked at. > > What prevents the user from typing the url by hand to edit the action? > Then you'd have two users with the same form in the edit state. I don't > think hiding the link is really preventative. > > Cheers, > Darrik > > -- > Darrik Mazey > DMT Programming, LLC. > P.O. Box 91 > Torrington, CT 06790 > office: 330.983.9941 > fax: 330.983.9942 > mobile: 330.808.2025 > [email protected] > > To obtain my public key, send an email to > [email protected]. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

