Thursday, August 4, 2011

[Rails] Creating form for associated has_many model

This example shows how to create a form for an associated model
'Comment', where 'Comment' belongs_to 'Post' and 'Post has_many
'Comments'.

http://edgeguides.rubyonrails.org/getting_started.html#generating-a-controller

How might I modify that to display all the comments in the form, and
still have it call the CommentsController (versus having the form call
the PostsController, as in the example here http://railscasts.com/episodes/17-habtm-checkboxes)?

Thanks

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate