Draiken/opinio

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

Summary

Maintainability
Test Coverage
<div id="new_comment">
  <% if current_commenter %>
    <h3><%= t('opinio.messages.add_comment') %></h3>
    <%= form_for Comment.new, :remote => false do |f| %>
      <p>
        <%= f.text_area :body %>
      </p>
      <%= 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') %>
    <% end %>
  <% else %>
    <p>
      <%= t('opinio.messages.must_be_logged_in_to_comment') %>
    </p>
  <% end %>
</div>