Re: [Rails] Comment has_many comments
On 17 January 2013 21:51, Walter Lee Davis <waltd@wdstudio.com> wrote:
>
> On Jan 17, 2013, at 1:32 PM, Роман Пружанский 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 only studying Rails. Sorry for my bad english.
>
> You may want to look at Single Table Inheritance for this. That's a pretty simple way to make a linked list, which is what you're describing.
Walter, can you give a link or a brief description on how to use STI
to implement a linked list, or a link to a description? I have not
come across that idea before.
thanks
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home