<%= form_for(@comment, :remote => (params[:action] == 'new' ? true : false)) do |f| %> <% if @comment.errors.any? %>

<%= pluralize(@comment.errors.count, "error") %> prohibited this comment from being saved:

<% end %>
Required fields
<%= f.label :subject, :class => 'required' %>
<%= f.text_field :subject, :required => true %>
<%= f.label :body, :class => 'required' %>
<%= f.text_area :body, :required => true %>
<% if params[:attachment] %>
<%= f.label :attachment %>
<%= f.file_field :attachment %>
<%= f.label :other_attachment %>
<%= f.file_field :other_attachment %>
<% end %>
<%= f.submit :data => {disable_with: "Submitting..."} %>
<% end %>