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| %> <p><%= in_place_editor_field :s, ''name'' %></p> <% 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 --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Nevermind. I found the answer here: http://www.weeatbricks.com/2007/09/01/in_place_editor_field-method-in-ruby-on-rails/ On Dec 18, 3:37 pm, eggman2001 <sod...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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| %> > <p><%= in_place_editor_field :s, ''name'' %></p> > <% 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--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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!) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---