Displaying 1 result from an estimated 1 matches for "indocumentscontroller".
Did you mean:
documentscontroller
2010 Feb 26
0
save has-many associations
...lt;% end %>
<% end %>
<p>
<%= f.submit "Submit Document" %>
</p>
<% end %>
What is way to save the header, sections and items. Do I have to iterate
the request hash.
The below code doesn''t work. Gives ActiveRecord::UnknownAttributeError
inDocumentsController#create
def create
@document = Document.new(params[:document])
@document.save!
end
Request:
{"commit"=>"Submit Document",
"authenticity_token"=>"+uOqJn1DSjzK6r1iIkaIqZa9VrKpU2Yr/A6zP0vg0eM=",
"document"=>{"section"=>{"#...