--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I've found that is more simpler than I've thought.
Models are:
Shop has_many :document, Document belongs_to :shop.
For edit action I've done:
@shop = Shop.find(params[:id])
@document = @shop.documents.new
and in the form I've done:
fields_for @document.
Now I can modify an existing shop and at the same time add a document.
Do you think it's all correct?
The problem is that I want to add a new document when I am in the edit action.
In the form for edit I have all shop fields with their values and also
the document fields with their values.
I want the document fields blank so that I can insert new values and
add a document for the shop.