Controller part of in-place editing


#1

I’m doing some incremental improvements on scaffolding, and want to add
in-place editing to an admin section. I think I may have the view part
working right (at least, the editor pops up as expected) with this in my
view:

<% for link in @links %>

<%= link.url %>
<%= in_place_editor ('url' + link.id.to_s, :url => {:action => 'edit_inplace'} ) %>
<%= link.title %>
<%= in_place_editor ('title_' + link.id.to_s) %>
<%= link.user %>
<%= in_place_editor ('user_' + link.id.to_s) %>
<%= link.date %>
<%= in_place_editor ('date_' + link.id.to_s) %>
<%= link.updated %>
<%= in_place_editor ('updated_' + link.id.to_s) %> <%= link_to 'Destroy', { :action => 'destroy', :id => link }, :confirm => 'Are you sure?' %> <% end %> ###

However, after reading the docs on the in_place_editor and
in_place_edit_for controller macro, I’m pretty stumped as to what I need
to put into my controller to actually get the editing going. Should it
be
the in_place_edit_for? Should I be using in_place_editor_field instead
of
in_place_editor?

Does anyone have a working example I could use, or have any advice to
offer?

–Wade