diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-24 18:29:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-24 18:29:37 +0000 |
commit | 82d70d1d16443edc787b2a3acf99dd1ff7f8fdcc (patch) | |
tree | ba04e190c090a03b24dbc98d298cb22ec73932af /actionpack/lib | |
parent | b445a74c5e1cdb10333b02515e42b584463ae10b (diff) | |
download | rails-82d70d1d16443edc787b2a3acf99dd1ff7f8fdcc.tar.gz rails-82d70d1d16443edc787b2a3acf99dd1ff7f8fdcc.tar.bz2 rails-82d70d1d16443edc787b2a3acf99dd1ff7f8fdcc.zip |
Added that render :xml will try to call to_xml if it can [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index c0c91a3ac9..c1c9e57342 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -879,7 +879,7 @@ module ActionController #:nodoc: def render_xml(xml, status = nil) #:nodoc: response.content_type = Mime::XML - render_text(xml, status) + render_text(xml.respond_to?(:to_xml) ? xml.to_xml : xml, status) end def render_json(json, callback = nil, status = nil) #:nodoc: |