Checkout these two railscasts, they should get you started in right
direction:
http://railscasts.com/episodes/196-nested-model-form-part-1
http://railscasts.com/episodes/197-nested-model-form-part-2


Chirag
http://sumeruonrails.com



On Fri, Jul 1, 2011 at 4:16 PM, Mauro <[email protected]> wrote:

> I have Shop has_many :documents and Documen belongs_to :shop.
> When I create a new shop I use accept_nested_attributes_for :documents
> in the model and fields_for in the form, so I can create a new shop
> and at the same time a document associated to the shop.
> I want to add a new document associated to the shop also when I edit
> the shop, at the same time I edit the shop.
> If I call the edit action for shop, in the form I have the fields for
> one of the documents associated with their values but I want to add a
> new document.
> There is a way to do this?
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to