Asking for help for in_place_editor_field

The in-place editor works for me, but not when I’m iterating over
objects in an array. I have the following in my view:
<% @session_types.each do |s| %>

<%= in_place_editor_field :s, 'name' %>

<% end %>

@session_types is an array of objects that have the attribute ‘name’.
However, I’m getting the error message:
Called id for nil, which would mistakenly be 4 – if you really wanted
the id of nil, use object_id

Nevermind. I found the answer here:
http://www.weeatbricks.com/2007/09/01/in_place_editor_field-method-in-ruby-on-rails/

eggman2001 wrote:

Nevermind. I found the answer here:
http://www.weeatbricks.com/2007/09/01/in_place_editor_field-method-in-ruby-on-rails/

Thanks for posting the link… I beat my head over that for a hour or so
the other day and gave up (wanting to save my question karma for more
pressing needs!)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs