26 Commits

Author SHA1 Message Date
iwsksky
e68dbee806 update document/use let statement 2019-10-04 12:50:22 -04:00
iwsksky
b9a86a002a pass array of unique movies to serializer 2019-10-04 12:50:22 -04:00
Daniel Duke
5767664c8a add specs for multiple include options 2019-10-04 12:50:22 -04:00
Daniel Illi
8d8e5c3059 Fix error on defining anonymous serializer class, fixes #353 2019-10-04 12:50:22 -04:00
Danil Pismenny
1a407c0030 [#365] Support frozen array in option 2019-10-04 12:50:22 -04:00
Maros Hluska
d5ea95370f Fix params not being hash by default 2018-10-18 22:59:33 +07:00
François Pradel
955f4f234d Add support for polymorphic includes 2018-08-31 19:17:45 -07:00
Igor Khodyrev
e3c45d9b1b Fix weak entities case (id is not meaningful attribute) with include. 2018-08-22 20:05:51 -07:00
Trevor Hinesley
07b6e614ac Params are now passed to nested includes 2018-07-19 09:57:22 -05:00
Oleksiy Babich
ecb92f07f5 add is_collection parameter to force corresponding serialization (#239)
* add is_collection parameter to force corresponding serialization

* add documentation for is_collection purpose, behavior
and notes re. default autodetect logic
2018-07-03 19:35:06 -07:00
Trevor Hinesley
f864099761 Conditional relationships should be removed from included when proc evaluates to false 2018-07-03 19:33:34 -07:00
Kyle Reeves
0b70657a41 update test for conditional relationships 2018-07-03 19:33:34 -07:00
Kyle Reeves
5558dcd703 allow conditional relationships 2018-07-03 19:33:34 -07:00
Trevor Hinesley
bad004fd42 Allow conditional attributes 2018-06-21 18:38:42 -07:00
homer
44d5e0f9c5 Fix serialization for nested nil includes with block 2018-05-31 17:16:54 -07:00
Shishir Kakaraddi
ea5296ac25 making object level links similar to attributes 2018-05-20 15:08:47 -07:00
Jodi Showers
74f27ccdf0 Links within data (#161) 2018-05-20 13:14:46 -07:00
Ryan O'Donnell
b090391551 Fix serialization for nested nil includes 2018-05-18 19:06:16 -07:00
Shishir Kakaraddi
00d3aa4997 adding NotImplementedError when trying to include polymorphic relationships 2018-05-10 23:22:21 -07:00
Jodi Showers
3ebf34928c Serialize nested includes (#152) 2018-05-10 21:17:32 -07:00
mnauage
ecd7bbc793 links key support 2018-03-18 22:31:02 -07:00
corinnekunze
f029cf737a Adding specs for #as_json method on ObjectSerializer and making sure non-included attributes are removed 2018-03-12 22:36:50 -07:00
Vlado Cingel
765eaa70d6 Title fixed for one spec 2018-03-12 22:18:17 -07:00
Sam Morgan
dfd215d3a1 91 allow includes strings (#93)
* add hash benchmarking to performance tests

* Add missing attribute in README example

* Disable GC before doing performance test

* Enable oj to AM for fair benchmark test

* add information on performance methodology

* add oss metadata

* Make an error that demonstrates [Issue

* Simple RSpec test that fails with a non-empty string but passes with a
non-empty symbol
* To run the test, rspec spec/lib/object_serializer_spec.rb

* Map includes to symbols if they are provided as strings

* Includes would fail with an ArgumentError unless they were explicitly
provided as symbols (see #97)
* This is solved by mapping the strings to symbols in the
ObjectSerializer initializer
* No real impact on performance here
2018-02-28 08:29:24 -08:00
jeremyjung
e7caa7afd5 Allow has_one nil association (#48)
* Allow has_one nil association

* add test for when has_one returns nil

* modify has_one extension method, add active record test

* Use try operator to support old rubies
2018-02-07 08:54:53 -08:00
Shishir Kakaraddi
5374a1378e initial commit 2018-01-31 16:20:40 -08:00