Closed sepalaur closed 10 years ago
I just filtered the comments variable at: https://github.com/lml/commontator/blob/master/app/views/commontator/threads/_show.html.erb#L60 With the get variable and it worked, thanks anyway!
You mean like tagging comments and clicking a tag to display only the comments with that tag?
That would probably require adding support for a tagging gem. I can try to do this, but probably not until the weekend.
Hm if you found an easy way to do it, I probably misunderstood what the problem was. Never mind.
It's what you said but in a very simple way: I added a column "label" to the commentator comments, and created a form with a "label" field, then I filtered the comments using something like:
<% filtered_comments = comments.where(:label=> params[:label]) %>
That's fine for me now!
Where is the code that updates inmediately the view when we edit a comment? (to do the same with my "label")
If you can put your label in app/views/commontator/comments/_body.html.erb
, it should be automatic.
Otherwise, modify app/views/commontator/comments/update.js.erb
to also reload the partial you are using.
I updated
app/views/commontator/comments/update.js.erb
and it worked, thanks!
I added a "label" field to the commontator comments. Now I want to filter the comments displayed by using a form to select the label. Could you please give me some directions on the best way to do that?
Thanks a lot