Skip to content

Commit

Permalink
Merge pull request #21161 from rails/rm-xml-serializer
Browse files Browse the repository at this point in the history
Remove XML Serialization from core
  • Loading branch information
rafaelfranca committed Aug 7, 2015
2 parents 752432e + f7ebdb1 commit 9645820
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 1,204 deletions.
4 changes: 4 additions & 0 deletions activemodel/CHANGELOG.md
Expand Up @@ -3,6 +3,10 @@

*Jay Elaraj*

* Remove `ActiveModel::Serializers::Xml` from core.

*Zachary Scott*

* Add `ActiveModel::Dirty#[attr_name]_previously_changed?` and
`ActiveModel::Dirty#[attr_name]_previous_change` to improve access
to recorded changes after the model has been saved.
Expand Down
9 changes: 1 addition & 8 deletions activemodel/README.rdoc
Expand Up @@ -155,7 +155,7 @@ behavior out of the box:
* Making objects serializable

<tt>ActiveModel::Serialization</tt> provides a standard interface for your object
to provide +to_json+ or +to_xml+ serialization.
to provide +to_json+ serialization.

class SerialPerson
include ActiveModel::Serialization
Expand All @@ -177,13 +177,6 @@ behavior out of the box:
s = SerialPerson.new
s.to_json # => "{\"name\":null}"

class SerialPerson
include ActiveModel::Serializers::Xml
end

s = SerialPerson.new
s.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<serial-person...

{Learn more}[link:classes/ActiveModel/Serialization.html]

* Internationalization (i18n) support
Expand Down
1 change: 0 additions & 1 deletion activemodel/lib/active_model.rb
Expand Up @@ -58,7 +58,6 @@ module Serializers

eager_autoload do
autoload :JSON
autoload :Xml
end
end

Expand Down
3 changes: 0 additions & 3 deletions activemodel/lib/active_model/serialization.rb
Expand Up @@ -40,7 +40,6 @@ module ActiveModel
#
# class Person
# include ActiveModel::Serializers::JSON
# include ActiveModel::Serializers::Xml
#
# attr_accessor :name
#
Expand All @@ -55,13 +54,11 @@ module ActiveModel
# person.serializable_hash # => {"name"=>nil}
# person.as_json # => {"name"=>nil}
# person.to_json # => "{\"name\":null}"
# person.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<serial-person...
#
# person.name = "Bob"
# person.serializable_hash # => {"name"=>"Bob"}
# person.as_json # => {"name"=>"Bob"}
# person.to_json # => "{\"name\":\"Bob\"}"
# person.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<serial-person...
#
# Valid options are <tt>:only</tt>, <tt>:except</tt>, <tt>:methods</tt> and
# <tt>:include</tt>. The following are all valid examples:
Expand Down
238 changes: 0 additions & 238 deletions activemodel/lib/active_model/serializers/xml.rb

This file was deleted.

0 comments on commit 9645820

Please sign in to comment.