diff --git a/lib/action_view/helpers/dynamic_form.rb b/lib/action_view/helpers/dynamic_form.rb
index f127ff9..7f0709e 100644
--- a/lib/action_view/helpers/dynamic_form.rb
+++ b/lib/action_view/helpers/dynamic_form.rb
@@ -139,8 +139,8 @@ def error_message_on(object, method, *args)
# This DIV can be tailored by the following options:
#
# * :header_tag - Used for the header of the error div (default: "h2").
- # * :id - The id of the error div (default: "error_explanation").
- # * :class - The class of the error div (default: "error_explanation").
+ # * :id - The id of the error div (default: "errorExplanation").
+ # * :class - The class of the error div (default: "errorExplanation").
# * :object - The object (or array of objects) for which to display errors,
# if you need to escape the instance variable convention.
# * :object_name - The object name to use in the header, or any text that you prefer.
@@ -207,7 +207,7 @@ def error_messages_for(*params)
value = options[key]
html[key] = value unless value.blank?
else
- html[key] = 'error_explanation'
+ html[key] = 'errorExplanation'
end
end
options[:object_name] ||= params.first
@@ -221,7 +221,7 @@ def error_messages_for(*params)
message = options.include?(:message) ? options[:message] : locale.t(:body)
- error_messages = objects.sum do |object|
+ error_messages = objects.map do |object|
object.errors.full_messages.map do |msg|
content_tag(:li, msg)
end