Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9128

Show
Ignore:
Timestamp:
03/29/08 00:26:15 (2 months ago)
Author:
bitsweat
Message:

Revert spurious commit from [9126]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_view/helpers/active_record_helper.rb

    r9126 r9128  
    204204      alias_method :tag_without_error_wrapping, :tag 
    205205      def tag(name, options) 
    206         if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name) 
    207           # error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name)) 
    208           tag_without_error_wrapping(name, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' })) 
     206        if object.respond_to?("errors") && object.errors.respond_to?("on") 
     207          error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name)) 
    209208        else 
    210209          tag_without_error_wrapping(name, options) 
     
    214213      alias_method :content_tag_without_error_wrapping, :content_tag 
    215214      def content_tag(name, value, options) 
    216         if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name) 
    217           # error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name)) 
    218           content_tag_without_error_wrapping(name, value, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' })) 
     215        if object.respond_to?("errors") && object.errors.respond_to?("on") 
     216          error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name)) 
    219217        else 
    220218          content_tag_without_error_wrapping(name, value, options)