Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/action_view/helpers/dynamic_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ def error_message_on(object, method, *args)
# This <tt>DIV</tt> can be tailored by the following options:
#
# * <tt>:header_tag</tt> - Used for the header of the error div (default: "h2").
# * <tt>:id</tt> - The id of the error div (default: "error_explanation").
# * <tt>:class</tt> - The class of the error div (default: "error_explanation").
# * <tt>:id</tt> - The id of the error div (default: "errorExplanation").
# * <tt>:class</tt> - The class of the error div (default: "errorExplanation").
# * <tt>:object</tt> - The object (or array of objects) for which to display errors,
# if you need to escape the instance variable convention.
# * <tt>:object_name</tt> - The object name to use in the header, or any text that you prefer.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down