1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

7 commits

Author SHA1 Message Date
Rafael Mendonça França
69645cba72 Simplify the implementation of custom argument serializers
We can speed up things for the supported types by keeping the code in the
way it was.

We can also avoid to loop trough all serializers in the deserialization by
trying to access the class already in the Hash.

We could also speed up the custom serialization if we define the class
that is going to be serialized when registering the serializers, but
that will remove the possibility of defining a serialzer for a
superclass and have the subclass serialized using it.
2018-02-14 13:10:08 -05:00
Rafael Mendonça França
d9a5c7011f Add serializers for Time, Date and DateTime 2018-02-14 13:10:08 -05:00
Rafael Mendonça França
b098584f63 Add symbol and duration serializers 2018-02-14 13:10:08 -05:00
Rafael Mendonça França
ea61533245 Only add one more custom key in the serialized hash
Now custom serialziers can register itself in the serialized hash using
the "_aj_serialized" key that constains the serializer name.

This way we can avoid poluting the hash with many reserved keys.
2018-02-14 13:10:07 -05:00
Rafael Mendonça França
ec686a471e Simplify the implementation of custom serialziers
Right now it is only possible to define serializers globally so we don't
need to use a class attribute in the job class.
2018-02-14 13:10:07 -05:00
Evgenii Pecherkin
3785a57299 Remove non-default serializers 2018-02-14 13:10:07 -05:00
Evgenii Pecherkin
e360ac1231 Introduce serializers to ActiveJob 2018-02-14 13:10:07 -05:00