aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-03-29 00:26:15 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-03-29 00:26:15 +0000
commit3748d7a0f2a2826cfb9aa8fdde5789fa62b0de34 (patch)
tree25a43c8df0f5594ca931577a5dbdaf50b88cc903 /actionpack
parentbbf738f269bac83bcc8a0100455c69cba638d877 (diff)
downloadrails-3748d7a0f2a2826cfb9aa8fdde5789fa62b0de34.tar.gz
rails-3748d7a0f2a2826cfb9aa8fdde5789fa62b0de34.tar.bz2
rails-3748d7a0f2a2826cfb9aa8fdde5789fa62b0de34.zip
Revert spurious commit from [9126]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9128 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 6b9543c3be..7569cc381d 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -203,9 +203,8 @@ module ActionView
alias_method :tag_without_error_wrapping, :tag
def tag(name, options)
- if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name)
- # error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name))
- tag_without_error_wrapping(name, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' }))
+ if object.respond_to?("errors") && object.errors.respond_to?("on")
+ error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name))
else
tag_without_error_wrapping(name, options)
end
@@ -213,9 +212,8 @@ module ActionView
alias_method :content_tag_without_error_wrapping, :content_tag
def content_tag(name, value, options)
- if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name)
- # error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name))
- content_tag_without_error_wrapping(name, value, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' }))
+ if object.respond_to?("errors") && object.errors.respond_to?("on")
+ error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name))
else
content_tag_without_error_wrapping(name, value, options)
end