views:

16

answers:

1

This is the view of a table that I have:

<% @campaign_events.each do |campaign_event| %>
    <% model_name = campaign_event.class.name.tableize.singularize %>

  <tr class="<%= cycle('oddrow','evenrow') %>">
    <td><%= link_to campaign_event.title,  send("#{model_name}_path", campaign_event) %></td>
      <td><span class='model_name'><%= model_name.capitalize %></span> 
    <td><center><%= campaign_event.days %></center></td>
    <td><center><%= campaign_event.count_sent%></center></td>
  </tr>
  <% end %>
  </table>

@campaign_events can contain an array of several different Model objects: Email, Call, Postalcard, etcetera.

I want to be able to edit the value in campaign_event.days.

I'd like to be able to use some kind of a plugin rather than hand-coding it all, because there are alot of other views that I need to make in-place-editable.

But I'm not sure how to begin with this. This is a key one to begin with.

A: 

This is the plugin for in place editing. http://github.com/rails/in_place_editing

krunal shah
this seemed too limited -- didn't allow nested associations or just plain REST calls to edit it appeared...only within views for the model....
Angela