I'm interested in the question of the two-level comments
for example: I use some post
with comments
list
The user can add his/her own comments, and in my app I show all comments like that:
<div id='com'>
<%= render @post.comments %>
</div>
in my view/comments/_comment
:
<div class='comments'>
<p>
<strong>Commenter:</strong>
<%= comment.commenter %>
</p>
<p>
<strong>Comment:</strong>
<%= comment.body %>
</p>
<%= link_to "Del", [comment.post, comment], :confirm => 'Are you sure?', :method => :delete %>
<hr>
</div>
in my comments
table I have post_id
and body
of comment ( and other fields )
and my View, I show
all comments to post by created_at
(I not sure but I think this is right assumption ) because I use <%= render @post.comments %>
And that is question: I don't understand how can I realize two-level comments?
I am also looking for simple examples on this theme, please. or tell me the main idea of this implementation...
UPD:
i create some post in my blog : first user commented it, second user commented it, third user commented it
than i open post, saw three comments and i disagreed with first commenter - and i want put my comment between first commenter and second commenter - how can i realize that?