Is it possible to split a form into multiple erb modules?
- by Ya.
I have a large form with multiple tabs and would like to be able to split it into multiple modules and include each as a partial. Something like:
main.html.erb:
<%= form_for (@myobject) do |f| %>
<%= render "module1" %>
....
module1.html.erb:
<%= f.text_field :field1 %>
...
Needless to say, when I do it like this I get an error from module1 that "f" is undefined.
Is there a way to split form fields into multiple modules?