diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-21 12:26:08 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-21 12:26:08 +0000 |
commit | 5c4469f3a820f0e4475d4a6496539e3c96f82258 (patch) | |
tree | d01afa1ad9ccda6efeec4b859ab5ff8d597e69bc /actionpack/lib | |
parent | 79790df40c1d4eb0bf969e816ad88a0573833148 (diff) | |
download | rails-5c4469f3a820f0e4475d4a6496539e3c96f82258.tar.gz rails-5c4469f3a820f0e4475d4a6496539e3c96f82258.tar.bz2 rails-5c4469f3a820f0e4475d4a6496539e3c96f82258.zip |
Ruby 1.9 compat: form helper test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8466 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/active_record_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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? |