I''m trying to pass a hidden field (item_property) to the add_link
helper function but when I do it the process threads start eating up
memory and my computer freezes.
[code=helper.rb]
def add_link(name)
link_to_function name do |page|
page.insert_html :bottom,:partial, :partial =>
''item'', :object
=> Item.new(:item_property => "Some text") #adding this
parameter
creates a problem
end
end[/code]
[code=_item.rhtml]
...
<%= f.hidden_field :item_property, :index => nil %>
<%= f.text_field :item_text, :index => nil %>[/code]
[code=index.rhtml]
<%= add_link "+Add Field Dinamically" %>[/code]
Does anybody know how to define a property of a new object in this
context? I''ve been trying to figure it out for a month, so any help is
very appreciated.
Thanks
Nacho
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---