[Rails] can split form_for into two parts?
Rails 3.1.3
Is it possible to split form_for block into two parts?
More specifically, I want to create and save a model after filling
required fields.
But some of the fields are not required and unnecessary for the model.
<%= form_for(@foo) do |f| %>
f.field A
<% end %>
and form_tag updates the following select fields in form_for block with
JavaScript
<%= form_tag do %>
...
<% end %>
<%= form_for(@foo) do |f| %>
f.field B
<% end %>
Apparently if I hit the save button, it needs to save both field A and
B.
Thanks in advance.
soichi
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home