mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-24 23:06:50 +00:00
Add CHANGELOG entries
This commit is contained in:
parent
73774649e3
commit
82a4f25002
80
CHANGELOG.md
80
CHANGELOG.md
@ -1,68 +1,20 @@
|
|||||||
# UNRELEASED
|
# VERSION 0.9.0.pre
|
||||||
|
|
||||||
* ActiveModel::Serializable was created it has the shared code between
|
* The following methods were removed
|
||||||
AM::Serializer and AM::ArraySerializer. Basically enable objects to be
|
- Model#active\_model\_serializer
|
||||||
serializable by implementing an options method to handle the options
|
- Serializer#include!
|
||||||
of the serialization and a serialize method that returns an object to
|
- Serializer#include?
|
||||||
be converted to json by the module. This also removes duplicate code.
|
- Serializer#attr\_disabled=
|
||||||
https://github.com/rails-api/active_model_serializers/commit/6c6bc8872d3b0f040a200854fa5530a775824dbf
|
- Serializer#cache
|
||||||
|
- Serializer#perform\_caching
|
||||||
|
- Serializer#schema (needs more discussion)
|
||||||
|
- Serializer#attribute
|
||||||
|
- Serializer#include\_#{name}? (filter method added)
|
||||||
|
- Serializer#attributes (took a hash)
|
||||||
|
|
||||||
* ActiveModel::Serializer::Caching module was created it enables
|
* The following things were added
|
||||||
Serializers to be able to cache to\_json and serialize calls. This
|
- Serializer#filter method
|
||||||
also helps removing duplicate code.
|
- SETTINGS object
|
||||||
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.8.1
|
# VERSION 0.8.1
|
||||||
|
|
||||||
@ -125,7 +77,7 @@
|
|||||||
* Allow serialization_scope to be disabled with serialization_scope nil
|
* Allow serialization_scope to be disabled with serialization_scope nil
|
||||||
* Array serializer should support pure ruby objects besides serializers
|
* Array serializer should support pure ruby objects besides serializers
|
||||||
|
|
||||||
# VERSION 0.5.0 (May 16, 2012)
|
# VERSION 0.5.0
|
||||||
|
|
||||||
* First tagged version
|
* First tagged version
|
||||||
* Changes generators to always generate an ApplicationSerializer
|
* Changes generators to always generate an ApplicationSerializer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user