Permalink
Browse files

tag! is nicer than __send__

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3442e0c commit ffec8c6b0099885f655190e659dab9cde66b13a7 @dhh dhh committed Mar 10, 2006
@@ -38,7 +38,7 @@ def to_xml(options = {})
children = options.delete(:children)
options[:builder].instruct! unless options.delete(:skip_instruct)
- options[:builder].__send__(root) { each { |e| e.to_xml(options.merge({ :skip_instruct => true, :root => children })) } }
+ options[:builder].tag!(root) { each { |e| e.to_xml(options.merge({ :skip_instruct => true, :root => children })) } }
end
end
end
@@ -32,7 +32,7 @@ def to_xml(options = {})
else
type_name = XML_TYPE_NAMES[value.class.to_s]
- options[:builder].__send__(key.to_s.dasherize,
+ options[:builder].tag!(key.to_s.dasherize,
XML_FORMATTING[type_name] ? XML_FORMATTING[type_name].call(value) : value,
options[:skip_types] || value.nil? || type_name.nil? ? { } : { :type => type_name }
)

0 comments on commit ffec8c6

Please sign in to comment.