35 Commits

Author SHA1 Message Date
Trevor Hinesley
5c820695b3 Split attribute serialization into its own class 2018-06-21 18:38:42 -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
cd1bc0968e dont create a object for a has one relationship unnecessarily just to fetch id 2018-05-20 15:11:07 -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
Shishir Kakaraddi
d7f5c34404 fixes a syntax error 2018-05-10 22:13:59 -07:00
Jodi Showers
3ebf34928c Serialize nested includes (#152) 2018-05-10 21:17:32 -07:00
Shishir Kakaraddi
63f905ab36 adds params to relatinoship blocks and tests 2018-05-08 22:11:22 -07:00
Shuhei Kitagawa
e39de8c8c4 Enable to use block to define relationship 2018-05-06 10:26:38 -07:00
Zino
f4f289a0bc Remove duplicate id_hash call from #record_hash 2018-05-03 20:50:03 -07:00
Brandon Buck
a585497161 Add in options[:scope] and receiving scope in attribute blocks (#153) 2018-05-01 09:58:01 -07:00
Dillon Welch
1b3b533b40 Don't allocate variables if we're not going to use them 2018-04-26 19:33:20 -07:00
Dillon Welch
da275e189d Add default hash option to id_hash 2018-04-26 19:33:20 -07:00
Dillon Welch
ca0f600ed9 Use id_hash method instead of duplicating logic 2018-04-26 19:33:20 -07:00
Shuhei Kitagawa
4fdf5a221c Enable to set race_condition_ttl for cache_options 2018-04-08 22:53:31 -07:00
Shuhei Kitagawa
0d8bbedcdd Change transform_method to accessor 2018-03-29 17:22:51 -07:00
Dmitriy Ivliev
1196db46e5 add exception for missing id method 2018-03-26 22:38:14 -07:00
Dmitriy Ivliev
c2e4c01bf1 fix behaviour for struct without id 2018-03-26 22:38:14 -07:00
Shuhei Kitagawa
4f3a903e64 Remove redundant fetch from ids_hash_from_record_and_relationship 2018-03-26 22:12:07 -07:00
Shuhei Kitagawa
43239aff49 Enable to set customized id column 2018-03-18 08:29:13 -07:00
Shuhei Kitagawa
b4eaa04c09 Add frozen_string_literal: true 2018-03-12 22:20:48 -07:00
Shuhei Kitagawa
8c630d9b1c Remove unused local variables from #relationships_hash 2018-03-12 22:20:09 -07:00
Christopher Sansone
b30a53bc5f ability to customize rendering of attributes via a block (#54)
* 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

* ability to customize rendering of attributes via a block

* fixed attribute render spec

* minimized specs to specifially test this feature

* Update README to include attribute definitions

* Fixed syntax error

* Fixed merge issues
2018-02-09 08:59:07 -08:00
Roberto Quintanilla
6d516c217c Support for polymorphic associations (#64)
* 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

* Support for polymorphic associations

* Optional dictionary for polymorphic associations

* Added polymorphic record types memoization

* Updated performance tests for polymorphic examples to include jsonapi-rb
2018-02-08 22:18:46 -08:00
Benjamin Fleischer
d4b6216ff3 Make our own fast MultiToJson 2018-02-07 18:02:59 -08:00
Benjamin Fleischer
b717ffeccf Let people choose their JSON serializer; JSON:API is not circular 2018-02-07 18:02:59 -08:00
Guillermo Iguaran
639c314272 Use Object#public_send to respect attributes visibility 2018-02-04 19:32:59 -08:00
Sergii Makagon
7f27543081 Refactoring 2018-02-04 17:12:18 -08:00
Benjamin Roth
dc563407e0 rename in-block var to avoid confusion 2018-02-04 12:00:45 -08:00
Benjamin Roth
088d655998 get rid of temp variables 2018-02-04 12:00:45 -08:00
Amrr Bakry
c25dc7c60a Remove duplicated record_type 2018-02-01 17:48:58 +02:00
Shishir Kakaraddi
5374a1378e initial commit 2018-01-31 16:20:40 -08:00