weathermen/soundstorm

View on GitHub
app/views/comments/_comment.html.haml

Summary

Maintainability
Test Coverage
.comment
  %header.comment__metadata
    = link_to comment.user.name, comment.user, class: 'comment__user'
    = link_to view_comment_path(comment), class: 'comment__date' do
      = comment_date(comment)
  %main.comment__content
    %p
      - if comment.user.avatar.attached?
        - avatar = comment.user.avatar_image(resize: 50)
        = image_tag avatar, class: 'comment__avatar'
      = comment.content
  %footer.comment__links
    %nav.navigation
      = link_to edit_user_track_comment_path(comment.track.user, comment.track, comment), class: 'navigation__link' do
        = t('.edit')
      = link_to user_track_comment_path(comment.track.user, comment.track, comment), method: :delete, class: 'navigation__link' do
        = t('.delete')