aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-05-06 12:35:08 -0300
committerJeremy Kemper <jeremy@bitsweat.net>2010-05-12 09:31:36 -0700
commitbea3c26833ad3e1e94f7331e0553a4e2164e7de5 (patch)
tree67feace8da33b390feff26618e7f42826437a7f9 /activemodel/lib
parentf7862b2c34b5b298bf7b937c55f0637ebfe43a25 (diff)
downloadrails-bea3c26833ad3e1e94f7331e0553a4e2164e7de5.tar.gz
rails-bea3c26833ad3e1e94f7331e0553a4e2164e7de5.tar.bz2
rails-bea3c26833ad3e1e94f7331e0553a4e2164e7de5.zip
Make ActiveResource serialize XML correctly when element_name is set.
[#4529] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/serializers/xml.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/serializers/xml.rb b/activemodel/lib/active_model/serializers/xml.rb
index df7026b3ec..934af2b8a8 100644
--- a/activemodel/lib/active_model/serializers/xml.rb
+++ b/activemodel/lib/active_model/serializers/xml.rb
@@ -90,7 +90,7 @@ module ActiveModel
@builder = options[:builder]
@builder.instruct! unless options[:skip_instruct]
- root = (options[:root] || @serializable.class.model_name.singular).to_s
+ root = (options[:root] || @serializable.class.model_name.element).to_s
root = ActiveSupport::XmlMini.rename_key(root, options)
args = [root]