Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### This does not work:
- ## _from.html.erb
- <% form_for @cvcat do |f| %>
- <%= f.error_messages %>
- <p>
- <%= f.label :category %><br />
- <%= f.text_field :category %>
- </p>
- <p>
- <% f.fields_for :vitaes do |entry_form| %>
- <%= render :partial => 'entry_form' %>
- <% end %>
- </p>
- <p><%= f.submit "Submit" %></p>
- <% end %>
- ## _entry_form.html.erb
- <div class="entry">
- <p>
- <%= entry_form.label :entry %>
- <%= entry_form.text_field :entry %>
- </p>
- </div>
- ###This works:
- ## _form.html.erb
- <% form_for @cvcat do |f| %>
- <%= f.error_messages %>
- <p>
- <%= f.label :category %><br />
- <%= f.text_field :category %>
- </p>
- <p>
- <% f.fields_for :vitaes do |entry_form| %>
- <div class="entry">
- <p>
- <%= entry_form.label :entry %>
- <%= entry_form.text_field :entry %>
- </p>
- </div>
- <% end %>
- </p>
- <p><%= f.submit "Submit" %></p>
- <% end %>
Add Comment
Please, Sign In to add comment