On 17 January 2013 18:32, Роман Пружанский <[email protected]> wrote:
> Hi,
>
> I want to create web application where people can discuss some things.
> There will be a Posts and users can comment it, but I also want users can
> comment commentaries.
> Can I create model comment, that belongs_to comment and has_many comments,
> or smth similar?

I think what you are looking for is a self referential model.  If you google for
rails self referential
you will find suggestions on how to do it.  Start with some of the
later links however as the details of rails has changed over the
years.  The basic principle is still the same though.  My earlier
suggestion of working through tutorials to get the basics still stands
however, if you have not already done that.

Colin

-- 
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 https://groups.google.com/groups/opt_out.


Reply via email to