Draiken/opinio

View on GitHub
app/views/opinio/comments/_new.html.haml

Summary

Maintainability
Test Coverage
#new_comment
  - if current_commenter
    %h3= t('opinio.messages.add_comment')
    = form_for Comment.new, :remote => false do |f|
      %p= f.text_area :body
      = hidden_field_tag :commentable_id, commentable.id
      = hidden_field_tag :commentable_type, commentable.class.base_class.name.to_s
      = f.submit t('opinio.actions.add')
  - else
    %p= t('opinio.messages.must_be_logged_in_to_comment')