Robin Daugherty
57f1c1b1f9
Fix serialization_options for array serialization
2014-10-12 02:29:50 -04:00
Robin Daugherty
d39a99d770
Add serialization_options
...
Prior to 0.9, @options was used to see the options passed to to_json. For some reason, with 0.9 the options were no longer passed and were entirely inaccessible within a Serializer.
This restores the access by placing it in an attribute named serializer_options.
2014-10-12 01:08:47 -04:00
Theodore Konukhov
095bae31d4
fix for ruby 1.9.
2014-08-29 19:38:53 +02:00
Theodore Konukhov
dde1492934
tests for namespaced controlleler
2014-08-26 18:07:31 +02:00
Theodore Konukhov
26c0847563
- If a controller is in a namespace, serializer will be looked up in this namespace first.
...
- Serializers for associations will be looked up in a parent serializer's namespace first too.
- "Prefix" option for different versions of associations serializers. Example: has_many :users, as: :short -> ShortUserSerializer
TODO: tests, config option for enabling namespace lookup
2014-08-24 15:57:24 +02:00
Tema Bolshakov and Dmitry Myaskovskiy
eaedcefa4e
Test::Unit assert_serializer implemented
...
So you can assert specific serializer to be used.
2014-08-18 18:04:51 +04:00
Santiago Pastorino
d3d6c98148
Make ArraySerializer reuse Serializer embedded_in_root_associations code
2013-10-31 17:28:39 -02:00
Santiago Pastorino
1eea008336
Split root construction and serialization logic
2013-10-29 19:39:27 -02:00
Santiago Pastorino
daa9304398
Do not convert root and meta_key to Strings
2013-10-18 17:49:20 -02:00
Santiago Pastorino
0e0341effc
Implement embed in root
2013-10-18 17:49:19 -02:00
Santiago Pastorino
7ba05c02e3
Make Serializable module which implements as_json
2013-10-18 17:49:18 -02:00
Santiago Pastorino
14f51f2ea9
Remove everything, rewrite of AMS starts here
2013-10-18 17:46:18 -02:00
Santiago Pastorino
1a8709d71c
Move caching to a new module
2013-05-21 17:03:06 -07:00
Santiago Pastorino
f179a27ed7
Add docs to serializable
2013-05-21 17:03:06 -07:00
Santiago Pastorino
aaa08c25ef
Make include_meta and meta_key private
2013-05-21 17:03:06 -07:00
Santiago Pastorino
76fead041f
Make Serializer reuse Serializable
2013-05-21 17:03:06 -07:00
Santiago Pastorino
0e876624ec
Move reusable code to a module
2013-05-21 17:03:05 -07:00