I have been learning some RoR and I have just created my first web application, a photosharing site that is basically a Pinterest copy. Now I am trying to add more functionality and I would like if users would be able to comment pins.
I'm using the Commontator Gem: https://github.com/lml/commontator/blob/master/README.md
The only problem is that I don't know where to put <%= commontator_thread(commontable) %>
in my show.html.erb file. I have tried many different places but for some reason it ends up throwing an exception. Here is my show html.erb:
<%= link_to 'Back', pins_path %>
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="panel panel-default">
<div class="panel-heading center">
<%= image_tag @pin.image.url(:medium) %>
</div>
<div class="panel-body">
<p><%= @pin.description %></p>
<p><strong><%= @pin.user.name if @pin.user %></strong></p>
<%= link_to edit_pin_path(@pin) do %>
<span class="glyphicon glyphicon-edit"></span>
Edit
<% end %>
</div>
</div>
</div>
</div>
I would very much appreciate if someone could tell me where I should put that link.
Thank you!