Displaying 1 result from an estimated 1 matches for "hdrcomment".
Did you mean:
hdr_comment
2010 Feb 26
0
save has-many associations
...ument
has_many :items
end
class Item < ActiveRecord::Base
belongs_to :section
end
Here is the sample view for the ''new'' action
<% form_for(@document) do |f| %>
<%= f.error_messages %>
<p>
<p> Header <p/><br />
<%= f.label :hdrcomment %>
<%= f.text_field :hdrcomment %>
</p>
<% for section in @document.sections %>
<% f.fields_for section, :index => section do |s| %>
<%= section.seqnum %><br />
<% for item in section.items %>
<% s.fields_for item,...