rubybox wrote:
> What would be a smart way to Add a comment form and lists comments on
> a per model base?
> 
> Im building a social networking site and would like to have comments
> on certain contents. I could add a comment form for every model
> manually but what would be a better way to have comments added on a
> per model base ? Where I could add something in the model and it would
> include the comments, + new comment form?
> 
> Thx!

A comment is a comment is a comment, and as such, you need only one 
comment form. You should read up on partials, and multi-part forms 
(railscasts  [ http://railscasts.com/ ] has some very good episodes that 
would answer your questions IIRC.

If you want your comments related to multiple models, then you should 
look into polymorphic associations.

All eminently do-able in Rails.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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