Skip to content

Commit

Permalink
Add CHANGELOG entries
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Oct 18, 2013
1 parent 7377464 commit 82a4f25
Showing 1 changed file with 18 additions and 66 deletions.
84 changes: 18 additions & 66 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,20 @@
# UNRELEASED

* ActiveModel::Serializable was created it has the shared code between
AM::Serializer and AM::ArraySerializer. Basically enable objects to be
serializable by implementing an options method to handle the options
of the serialization and a serialize method that returns an object to
be converted to json by the module. This also removes duplicate code.
https://github.com/rails-api/active_model_serializers/commit/6c6bc8872d3b0f040a200854fa5530a775824dbf

* ActiveModel::Serializer::Caching module was created it enables
Serializers to be able to cache to\_json and serialize calls. This
also helps removing duplicate code.
https://github.com/rails-api/active_model_serializers/commit/3e27110df78696ac48cafd1568f72216f348a188

* We got rid of the Association.refine method which generated
subclasses.
https://github.com/rails-api/active_model_serializers/commit/24923722d4f215c7cfcdf553fd16582e28e3801b

* Associations doesn't know anymore about the source serializer.
That didn't make any sense.
https://github.com/rails-api/active_model_serializers/commit/2252e8fe6dbf45660c6a35f35e2423792f2c3abf
https://github.com/rails-api/active_model_serializers/commit/87eadd09b9a988bc1d9b30d9a501ef7e3fc6bb87
https://github.com/rails-api/active_model_serializers/commit/79a6e13e8f7fae2eb4f48e83a9633e74beb6739e

* Passing options[:hash] is not public API of include!. That was
removed.
https://github.com/rails-api/active_model_serializers/commit/5cbf9317051002a32c90c3f995b8b2f126f70d0c

* ActiveModel::Serializer::Associations::Config is now
ActiveModel::Serializer::Association but it's an internal
thing so shouldn't bother.
ActiveModel::Serializer::Associations::Has\* are now
ActiveModel::Serializer::Association::Has\* and inherit from
ActiveModel::Serializer::Association
https://github.com/rails-api/active_model_serializers/commit/f5de334ddf1f3b9764d914a717311532021785d2
https://github.com/rails-api/active_model_serializers/commit/3dd422d99e8c57f113880da34f6abe583c4dadf9

* serialize\_ids call methods on the corresponding serializer if they
are defined, instead of talking directly with the serialized object.
Serializers are decorators so we shouldn't talk directly with
serialized objects.

* Array items are not wrapped anymore in root element.

* embed and include were removed from AM::Serializer and there's a global config for them in AM::Serializers

So code like ...

class PostSerializer < ActiveModel::Serializer
embed :ids, :include => true
has_many :comments
end

should be changed to ...

class PostSerializer < ActiveModel::Serializer
has_many :comments, :embed => :ids, :include => true
end

or you could change the global defaults by adding ...

config.active\_model\_serializers.embed = :ids
config.active\_model\_serializers.include = true

to the config/application.rb file
# VERSION 0.9.0.pre

* The following methods were removed
- Model#active\_model\_serializer
- Serializer#include!
- Serializer#include?
- Serializer#attr\_disabled=
- Serializer#cache
- Serializer#perform\_caching
- Serializer#schema (needs more discussion)
- Serializer#attribute
- Serializer#include\_#{name}? (filter method added)
- Serializer#attributes (took a hash)

* The following things were added
- Serializer#filter method
- SETTINGS object

# VERSION 0.8.1

Expand Down Expand Up @@ -125,7 +77,7 @@
* Allow serialization_scope to be disabled with serialization_scope nil
* Array serializer should support pure ruby objects besides serializers

# VERSION 0.5.0 (May 16, 2012)
# VERSION 0.5.0

* First tagged version
* Changes generators to always generate an ApplicationSerializer

0 comments on commit 82a4f25

Please sign in to comment.