diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4e140e8c1..eb5752ff6 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -49,7 +49,7 @@ module ApplicationHelper instance = instance_variable_get("@#{instance_name}") if instance && instance.errors.any? - %{
Error: #{instance.__send__(:errors).full_messages.join(", ")}
}.html_safe + %{
Error: #{instance.__send__(:errors).full_messages.join(", ")}
}.html_safe else "" end diff --git a/app/views/comments/edit.html.erb b/app/views/comments/edit.html.erb index 1fac05f91..5d3874275 100644 --- a/app/views/comments/edit.html.erb +++ b/app/views/comments/edit.html.erb @@ -2,6 +2,8 @@

Edit Comment

+ <%= error_messages_for "comment" %> + <%= simple_form_for(@comment) do |f| %> <%= dtext_field "comment", "body" %> <%= f.button :submit, "Submit" %>