the-teacher/the_comments

View on GitHub
app/views/the_comments/slim/_comment_body.html.slim

Summary

Maintainability
Test Coverage
table.comment_body.table.table-striped.table-hover
  tr
    td  style: "width: 120px;" 
      b= comment.commentable_type
      | →
    td
      = link_to comment.commentable_title, comment.commentable_url
      | (#{comment.try(:commentable_state)})
  tr
    td
      b= t('the_comments.title')
    td
      - if comment.try(:user)
        = link_to comment.user_name, comment.user
      - else
        = comment.header_title
  tr
    td
      b= t('the_comments.contacts')
    td= comment.contacts
  tr.success
    td
      b= t('the_comments.content')
    td= comment.content