From 5c4469f3a820f0e4475d4a6496539e3c96f82258 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 21 Dec 2007 12:26:08 +0000 Subject: Ruby 1.9 compat: form helper test git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/active_record_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb index 9b3292a9b8..9736b7e438 100644 --- a/actionpack/lib/action_view/helpers/active_record_helper.rb +++ b/actionpack/lib/action_view/helpers/active_record_helper.rb @@ -149,7 +149,7 @@ module ActionView options[:object_name] ||= params.first options[:header_message] = "#{pluralize(count, 'error')} prohibited this #{options[:object_name].to_s.gsub('_', ' ')} from being saved" unless options.include?(:header_message) options[:message] ||= 'There were problems with the following fields:' unless options.include?(:message) - error_messages = objects.map {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } } + error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } }.join contents = '' contents << content_tag(options[:header_tag] || :h2, options[:header_message]) unless options[:header_message].blank? -- cgit v1.2.3