diff options
author | Jim Herzberg <jimmiesh@gmail.com> | 2011-05-18 15:52:55 -0400 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-18 15:52:55 -0400 |
commit | fbf99653f14273773e4437390ecdca736f495fb9 (patch) | |
tree | 951a8b018c05841e0d65570f29ffbb962a504f4c /activemodel/lib | |
parent | 3a5a378056ceed24c37c8834d65c1985aae56879 (diff) | |
download | rails-fbf99653f14273773e4437390ecdca736f495fb9.tar.gz rails-fbf99653f14273773e4437390ecdca736f495fb9.tar.bz2 rails-fbf99653f14273773e4437390ecdca736f495fb9.zip |
Attributes with :string type should not be given the type passed in model serialization options. Closes #1058
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/serializers/xml.rb | 2 |
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 19639b1363..eb3975f86b 100644 --- a/activemodel/lib/active_model/serializers/xml.rb +++ b/activemodel/lib/active_model/serializers/xml.rb @@ -25,7 +25,7 @@ module ActiveModel def decorations decorations = {} decorations[:encoding] = 'base64' if type == :binary - decorations[:type] = type unless type == :string + decorations[:type] = (type == :string) ? nil : type decorations[:nil] = true if value.nil? decorations end |