Dear all
I have been trying to get this piece of code working
http://pastie.org/236978
category: <%= category_form.select "category_id", @categories, :prompt => "category", :index => nil %>
<% if category.new_record? %>
<%= link_to_function "remove", "$
(this).up(‘.task’).remove()" %>
<% else %>
<%= link_to_function “remove”,
“category_for_destroy(this)” %>
<%= category_form.hidden_field :id, :index => nil %>
<%= category_form.hidden_field :should_destroy, :index
=> nil, :class => ‘should_destroy’ %>
<% end %>
<% end %>
The problem is this
the select statement should hide the id however, it does not work for
select and it works for the hidden field. I was trying hard to get it
working in the past two days. I tried to put :index => nil in
the :options and :html_options and the same problem did not get
solved
this concept was gotten from #75 Complex Forms Part 3 - RailsCasts
Thanks in advance
any idea