Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Link on notifications page:
- <%= link_to main_app.recipe_path(notification.second_target.recipe, notification.second_target.id, anchor: "comment_#{notification.target.id}"), class: "dark-link" do %>
- On the recipes page, I displayed all reviews comment
- <section class="comment-container">
- <p class="notifications-p">
- <button class="btn btn-default btn-sm mb-2" type="button" data-toggle="collapse" data-target="#collapseComments-<%= review.id %>" aria-expanded="false" aria-controls="collapseComments-<%= review.id %>">
- <% unless review.comments.blank? %>
- <small><i class="fa fa-comments text-muted"></i>View comments<i class="fa fa-chevron-down text-muted"></i></small>
- <% else %>
- <small><i class="fa fa-comment text-muted"></i>Add Comment<i class="fa fa-chevron-down text-muted"></i></small>
- <% end %>
- </button>
- </p>
- <div class="collapse" id="collapseComments-<%= review.id %>">
- <div class="comments-card">
- <%= render "comments/widget", commentable: review %>
- </div>
- </div>
- </section>
- _comment.html.erb
- <li id="comment_<%= comment.id %>" class="comment">
- ...
- </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement