Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 6f5fcc44699e50b54301d2005180e443da45be8f 1 parent 7140f65
@dhh dhh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionpack/lib/action_view/helpers/active_record_helper.rb
View
2  actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -101,7 +101,7 @@ def error_messages_for(object_name, options = {})
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) }),
Please sign in to comment.
Something went wrong with that request. Please try again.