Merge pull request #147 from maslick/resultCommentsError1000Chars

Fixed: Comments in results have no error message if the text exceeds 1000 characters
This commit is contained in:
Zmago Devetak 2016-09-16 09:38:38 +02:00 committed by GitHub
commit 431227c0a4
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@ class ResultCommentsController < ApplicationController
format.html { render :new }
format.json {
render json: {
errors: @comment.errors
errors: @comment.errors.to_hash(true)
}
}
end

View file

@ -19,7 +19,7 @@
<li>
<hr>
<%= bootstrap_form_for :comment, url: { format: :json }, method: :post, remote: true do |f| %>
<%= f.text_field :message, hide_label: true, placeholder: t("general.comment_placeholder"), append: f.submit("+", onclick: "processResult(event, ResultTypeEnum.COMMENT, false);"), help: '.' %>
<%= f.text_field :message, hide_label: true, placeholder: t("general.comment_placeholder"), append: f.submit("+"), help: '.' %>
<% end %>
</li>
</ul>