243 Commits

Author SHA1 Message Date
Kenji Sakurai
57f09c7d71 Fix method order in spec after 2018-09-10 11:07:06 +09:00
Kenji Sakurai
6dc34cd4d4 Fix set_key_transform's set_type to give priority to pre-set value 2018-09-08 23:48:44 +09:00
Matthew Lanigan
5a70b1a686 Do not use ActiveSupport core extensions
Core extensions do not play well with many other gems; especially
considering that they only seem to be included for one `to_json` call,
they should be avoided.
2018-09-03 12:01:45 -07:00
Orhan Toy
8357acd6a7 [ci skip] Fix punctuation 2018-09-03 12:01:45 -07:00
François Pradel
955f4f234d Add support for polymorphic includes 2018-08-31 19:17:45 -07:00
François Pradel
3973b312a7 Demodulize relationship record class name 2018-08-31 19:17:45 -07:00
Alessandro Dal Grande
42d9203796 Fix confusing error when using include and no relationship was set
If you forgot to set any `has_many` in the serializer and tried to serialize with an `include` you would get:
```
NoMethodError (undefined method `[]' for nil:NilClass):
```

That is not very helpful. Setting the variable with a default case makes sure the right error message gets displayed.
2018-08-22 20:08:04 -07:00
Igor Khodyrev
e3c45d9b1b Fix weak entities case (id is not meaningful attribute) with include. 2018-08-22 20:05:51 -07:00
Shishir Kakaraddi
2eaaa71bd8
Merge pull request #299 from g13ydson/feature/add_option_key
add the option "key" in customizable options in the README
2018-08-13 18:05:05 -07:00
Gleydson Tavares
ce2c8003ee add the "option key" in customizable options 2018-08-10 13:15:02 -03:00
Shishir Kakaraddi
a5414c6b8f
Merge pull request #280 from manojmj92/add_meta
Introduce the ability to add `meta` tag for every resource in the collection
2018-07-23 13:30:39 -07:00
Shishir Kakaraddi
daf4030bb0
Merge pull request #274 from manojmj92/master
Evaluate ids via the specified 'id_method_name' when relationships are evaluated via a block
2018-07-23 13:26:53 -07:00
Trevor Hinesley
5a5a5e5125 Fixed conditional attributes documentation 2018-07-23 13:23:41 -07:00
Manoj M J
6d03db3a0c
Merge branch 'dev' into master 2018-07-21 10:06:56 +05:30
Manoj M J
0c367d2574 Minor code refactor 2018-07-21 10:05:01 +05:30
Manoj M J
099eb606bd
Merge branch 'dev' into add_meta 2018-07-21 09:39:33 +05:30
Shishir Kakaraddi
40125072c5
Merge pull request #278 from TrevorHinesley/params-in-nested-includes
Params are now passed to nested includes
2018-07-20 19:16:23 -07:00
Shishir Kakaraddi
75c959af81 Merge branch 'master' of https://github.com/Netflix/fast_jsonapi into dev 2018-07-20 18:57:07 -07:00
Erol
e1f782e79f Add missing fieldset parameter 2018-07-20 18:49:51 -07:00
Manoj M J
dd71bc15d6 Introduce the ability to add meta tag for every resource in the collection 2018-07-20 10:33:27 +05:30
Trevor Hinesley
dfcbe263fb
Merge branch 'master' into params-in-nested-includes 2018-07-19 09:58:25 -05:00
Trevor Hinesley
07b6e614ac Params are now passed to nested includes 2018-07-19 09:57:22 -05:00
Manoj M J
9c659839e4 Evaluate ids via the specified ‘id_method_name’ when relationships are evaluated via a block 2018-07-19 15:40:20 +05:30
Shishir Kakaraddi
5ff3fa97da
Merge pull request #273 from Netflix/release-1.3
Release 1.3
1.3
2018-07-16 22:01:17 -07:00
Shishir Kakaraddi
115a01a7c2 bump up version to 1.3 2018-07-16 21:52:58 -07:00
Erol
9aec7c58ed Add README instructions for using sparse fieldsets 2018-07-16 21:10:10 -07:00
Erol
fa194133fa Use record type instead of reflected record type 2018-07-16 21:10:10 -07:00
Erol
e2bf5411a2 Set the record type for inherited serializers 2018-07-16 21:10:10 -07:00
Erol
ab652c4400 Remove unused code 2018-07-16 21:10:10 -07:00
Erol
e683bbfb78 Update spec with included documents with no explicitly given fields 2018-07-16 21:10:10 -07:00
Erol
a363c90bfb Allow the serializer to return sparse fieldsets 2018-07-16 21:10:10 -07:00
Erol
41c1e0a106 Add proc shortcut use case to README 2018-07-16 21:10:10 -07:00
Erol
e05193fb5e Add spec for proc methods with optional arguments 2018-07-16 21:10:10 -07:00
Erol
449c1bf05f Allow passing procs with variable arguments when declaring an attribute 2018-07-16 21:10:10 -07:00
Erol
3df48cd4cb Add README instructions for using sparse fieldsets 2018-07-16 21:07:57 -07:00
Erol
5905497314 Use record type instead of reflected record type 2018-07-16 21:07:57 -07:00
Erol
77c7af2a5e Set the record type for inherited serializers 2018-07-16 21:07:57 -07:00
Erol
5aa5dc511c Remove unused code 2018-07-16 21:07:57 -07:00
Erol
d427a157ee Update spec with included documents with no explicitly given fields 2018-07-16 21:07:57 -07:00
Erol
7b44620018 Allow the serializer to return sparse fieldsets 2018-07-16 21:07:57 -07:00
Erol
abc830b41e Add proc shortcut use case to README 2018-07-16 09:05:04 -07:00
Erol
5c8e9358f2 Add spec for proc methods with optional arguments 2018-07-16 09:05:04 -07:00
Erol
77a3a0bb5b Allow passing procs with variable arguments when declaring an attribute 2018-07-16 09:05:04 -07:00
Shishir Kakaraddi
49193ab8f3
Merge pull request #265 from Netflix/dev
Dev
2018-07-03 21:14:18 -07:00
Shishir Kakaraddi
dc2b78bbe4 merging with release branch 2018-07-04 09:35:33 +05:30
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
Kyle Reeves
af38b30179 remove options param from Link class 2018-07-03 19:33:34 -07:00
Kyle Reeves
01477e9c5b fix relationship id_hash method 2018-07-03 19:33:34 -07:00
Kyle Reeves
699630d812 create link class 2018-07-03 19:33:34 -07:00
Kyle Reeves
f86a8926f5 make include_relationship? a public method and use it in get_included_records method 2018-07-03 19:33:34 -07:00