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.
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
...
<%= f.hidden_field :item_property, :index => nil %>
<%= f.text_field :item_text, :index => nil %>
<%= add_link "+Add Field Dinamically" %>
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