- @comments.each do |comment| - if comment.user_id == current_user.id - if comment.tutor_comment? - delete_path = tutor_student_comment_path(comment.for_user, comment) - elsif comment.mentor_comment? - delete_path = mentor_student_comment_path(comment.for_user, comment) - else - delete_path = student_tutor_comment_path(comment.for_user, comment) = link_to '', delete_path, method: :delete, confirm: 'Are you sure?', id: dom_id(comment, :delete), class: 'icon-trash pull-right' .row-fluid %div{:class => "comment #{comment.tutor_comment? ? 'tutor' : 'student'} #{cycle(:even, :odd)}"} = image_tag comment.user.image.url(:thumb), class: 'thumbnail pull-left mgn_r_10' %span.pull-left.comment_user{:style => "font-weight: bold;"} = comment.user.type == 'Tutor' ? tutor_shortened_name(comment.user) : comment.user.name %span.pull-left.pad_h_5{:style => "font-size: 0.8em; font-style: italic; color: #bbb;"} said at %span.pull-left{:style => "font-size: 0.8em; font-style: bold; color: #000;"} = "#{comment.created_at.hr_min_mer}:" %span.pull-left.txt_black.font_2.pad_l_10.showmore= format_text(comment.text) .clear