the-teacher/the_comments

View on GitHub
app/views/the_comments/haml/_form.html.haml

Summary

Maintainability
Test Coverage
%h3
  = link_to t('the_comments.new'), '#', id: :new_root_comment

= form_for Comment.new, remote: true, authenticity_token: true do |f|
  - if current_user
    = render partial: 'the_comments/haml/logined_form', locals: { f: f, commentable: commentable }
  - else
    = render partial: 'the_comments/haml/guest_form', locals: { f: f, commentable: commentable }