feat(comments): add edit and index

This commit is contained in:
dualfroz committed 2026-09-04 18:33:42 +02:00
1 parent 8660046b42
commit 4af7964451
3 files changed
+65

No files matched your search

@@ -0,0 +1,16 @@
<h1><%= t('comments.heading') %></h1>
<p><%== link_to(post.title, url_for(:post, slug: post.to_param)) %></p>
<% if comments.none? %>
<p><%= t('comments.empty') %></p>
<% else %>
<ul class="comments">
<% comments.each do |comment| %>
<%== partial('posts/comment', locals: { comment: comment, post: post }) %>
<% end %>
</ul>
<% end %>
<%== paginate(comments, path: ->(page) { "#{url_for(:comments, post_id: post.to_param)}?page=#{page}" }) %>
<p><%== link_to(t('posts.back_to_list'), url_for(:posts)) %></p>