Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove XML Serialization from core #21161

Merged
merged 1 commit into from Aug 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.