Ok, I'm clearly missing the boat on something here, I think about how to reference a child record (collection instance?) when using in_place_edit_field. Meeting and AgendaItem are both models, AgendaItem.name is the :text field I want to work with.
I have some code in my .rhtml like this (meeting has_many agenda_items) <h2>Agenda Items</h2> <% for agenda_item in @meeting.agenda_items %> <p> <%= agenda_item.name %></p> <% end %>
The controller method for this view is as follows: def show @meeting = Meeting.find(params[:id]) @users = User.find_all end
This works as-expected. Now I want to be able to in_place_edit the agenda items. I've tried several permutations, but none of them work.
this, for example: <h2>Agenda Items</h2> <% for agenda_item in @meeting.agenda_items %> <p> <%= in_place_editor_field :agenda_item, :name %></p> <% end %>
Gives me "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id"