Hi,
I am trying to implement in_place_field_editor into my UI in a limited
but useful way.
I want to use in_place_field_editor within a partial that is called
from a view as shown here:
    <%= render :partial => "shared/property",
               :collection => @properties,
               :locals => {:member_entity => @logged_in_member_entity}
    %>
Within the "property" partial, I use the "property" local
variable
(current entry of the :collection).
I should like to use in_place_field_editor to edit the name attribute
of "property" as shown here:
          <%= in_place_editor_field :property, :name, {},
{:external_control => "rename_name_#{property.id}", :save_text
=>
"update" } %>
To get this to work I must  first do  <% @property = property %>
Is it possible to avoid this last statement and just to refer to the
local variable "property" within the in_place_editor_field call?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Roderick van Domburg
2007-Jul-15  09:30 UTC
Re: in_place_field_editor: Must you have an instance variabl
No, not without hacking the in_place_editor. -- 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 -~----------~----~----~----~------~----~------~--~---