diff --git a/app/views/comment/_comment_form.html.erb b/app/views/comment/_comment_form.html.erb index 8aea736..7c0284d 100644 --- a/app/views/comment/_comment_form.html.erb +++ b/app/views/comment/_comment_form.html.erb @@ -46,14 +46,16 @@ function check_captcha(button, confirm_action) { } -<% if @comment && @comment.errors.any? %> +<% @comment ||= Comment.new %> + +<% if @comment.errors.any? %> <%= error_messages_for :comment %> <% end %>