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.
On Fri, Apr 17, 2009 at 7:54 PM, Phlip <[email protected]> wrote:
>
> Robert Walker wrote:
>
> > Phlip wrote:
>
> >> 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
>
> > Is there some reason to go through all this trouble with using
> > timestamps? Why not just use optimistic locking? I'm not saying this
> > isn't necessary, I'm actually curious of any advantage of using
> > timestamps.
>
> Fail open instead of fail closed?
>
> But I am more concerned about Chris's reply - I can't figure out the
> question...
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---