diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-12 17:44:28 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-04-12 17:44:28 +0000 |
commit | 6f5fcc44699e50b54301d2005180e443da45be8f (patch) | |
tree | 12f232085aa554f28d0396a61faf8cdc12026a62 /actionpack | |
parent | 7140f65355a7863b81028fbb2cb0b0dbcf93e8c0 (diff) | |
download | rails-6f5fcc44699e50b54301d2005180e443da45be8f.tar.gz rails-6f5fcc44699e50b54301d2005180e443da45be8f.tar.bz2 rails-6f5fcc44699e50b54301d2005180e443da45be8f.zip |
Made error_messages_for take a symbol as object_name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-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 090ca33cef..f8a003e948 100644 --- a/actionpack/lib/action_view/helpers/active_record_helper.rb +++ b/actionpack/lib/action_view/helpers/active_record_helper.rb @@ -101,7 +101,7 @@ module ActionView content_tag("div", content_tag( options[:header_tag] || "h2", - "#{pluralize(object.errors.count, "error")} prohibited this #{object_name.gsub("_", " ")} from being saved" + "#{pluralize(object.errors.count, "error")} prohibited this #{object_name.to_s.gsub("_", " ")} from being saved" ) + content_tag("p", "There were problems with the following fields:") + content_tag("ul", object.errors.full_messages.collect { |msg| content_tag("li", msg) }), |