I have a bit of a problem... I am rendering a table of objects using a partial with a collection of those objects. Inside of the partial, I''m trying to use an in_place_editor_field tag using the current object form the collection. Rails doesn''t seem to like this. Does in_place_editor_field require a member variable that is set in the controller? Since I''m using a variable named after the partial (since it is in a collection passed to the partial), is there anyway to get those table rows to include in_place_editors without re-inventing the wheel and writing my own code? -- 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 -~----------~----~----~----~------~----~------~--~---
Dave Smith wrote:> Does in_place_editor_field require a member variable that is set in the > controller? Since I''m using a variable named after the partial (since > it is in a collection passed to the partial), is there anyway to get > those table rows to include in_place_editors without re-inventing the > wheel and writing my own code?You can just do a <% @member = my_thing %> in the partial. -- Roderick van Domburg http://www.nedforce.nl -- 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 -~----------~----~----~----~------~----~------~--~---
Dave Smith wrote:> I have a bit of a problem... > > I am rendering a table of objects using a partial with a collection of > those objects. Inside of the partial, I''m trying to use an > in_place_editor_field tag using the current object form the collection. > Rails doesn''t seem to like this. > > Does in_place_editor_field require a member variable that is set in the > controller? Since I''m using a variable named after the partial (since > it is in a collection passed to the partial), is there anyway to get > those table rows to include in_place_editors without re-inventing the > wheel and writing my own code?When I did my in_place_editor_field I had to put something like: in_place_edit_for :user, :first in the controller. Not sure why this code is required, I would be interested to know why myself. I had help when doing my in_place_edit_field. I imagine it''s something like a pre-processing directive. ~S -- 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 -~----------~----~----~----~------~----~------~--~---
> When I did my in_place_editor_field I had to put something like: > > in_place_edit_for :user, :first > > in the controller. Not sure why this code is requiredThis creates the controller method that the in_place_editor_field javascript calls. -- 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 -~----------~----~----~----~------~----~------~--~---