about summary refs log tree commit diff stats
path: root/db/migrate/20231012190529_create_comments.rb
Commit message (Collapse)AuthorAgeFilesLines
* Added blog post commentingStar Rauchenberger2023-10-121-0/+15
#n25'>25
- title "Comments"
= will_paginate @comments
%table#entries
  %tr
    %th Text
    %th Author
    %th Blog post
    %th Date published
    %th
  - @comments.each do |comment|
    %tr{ class: cycle("even", "odd") }
      %td= comment.body
      %td
        %ul
          %li= comment.username
          %li= comment.email
          - unless comment.website.empty?
            %li= comment.website
      %td= link_to comment.blog.title, comment.blog
      %td= comment.published_at.strftime("%B %d, %Y, %l:%M%P")
      %td
        %ul.admin-actions
          %li= link_to "View", blog_url(comment.blog, anchor: "comment-#{comment.id}")
          %li= link_to "Delete", admin_comment_url(comment), method: :delete, data: { confirm: "Are you sure?" }
= will_paginate @comments