Bug fixed: comments in results have no error message if the text exceeds 1000 characters.

This commit is contained in:
Pavel Maslov 2016-09-13 12:01:56 +02:00
parent ed72996523
commit 15ea8fc0dc
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>