Trevor Hinesley
f1df3f4a2d
Added documentation about conditional attributes
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
Ray Walters
f54e6242ff
Remove extra 'class MovieSerializer' from an example in the README
2018-05-31 17:16:38 -07:00
Shishir Kakaraddi
39fdc6f66c
merge with master
2018-05-31 17:13:34 -07:00
Shishir Kakaraddi
81375cfcf7
bump up version to 1.2
2018-05-31 16:36:16 -07:00
Shishir Kakaraddi
ef42fb3031
Changes for version 1.2 ( #220 )
...
params support in blocks, nested includes etc
Co-authored-by: Jodi Showers <jodi@nnovation.ca>
Co-authored-by: Ryan O'Donnell <ryan@gocleary.com>
Co-authored-by: Les Fletcher <les.fletcher@gmail.com>
Co-authored-by: Ankit gupta <ankit.gupta8898@gmail.com>
Co-authored-by: Masato Ohba <over.rye@gmail.com>
Co-authored-by: Shuhei Kitagawa <shuhei.kitagawa@c-fo.com>
Co-authored-by: Zino <rhu5@u.rochester.edu>
Co-authored-by: Carlos Solares <csolares23@gmail.com>
Co-authored-by: Brandon Buck <lordizuriel@gmail.com>
Co-authored-by: Daniel Roux <xuoroux@gmail.com>
Co-authored-by: Dillon Welch <daw0328@gmail.com>
2018-05-31 16:35:59 -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
a018f1d32f
minor fixes to data links feature
2018-05-20 15:08:47 -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
Les Fletcher
077817ecec
fix skylight normalizers issue
2018-05-16 18:43:05 -07:00
Ankit gupta
ac136b988c
Merge pull request #213 from ohbarye/patch-1
...
Remove dead link
2018-05-14 21:42:53 -07:00
Masato Ohba
7263aba777
Remove dead link
...
Because the position is closed.
Refs: https://github.com/Netflix/fast_jsonapi/issues/209
2018-05-15 12:39:23 +09:00
Shishir Kakaraddi
3fb975602b
fixes some unnecessary performance test failures
2018-05-14 19:27:50 -07:00
Guillermo Iguaran
190bedaa05
Refactor compute_serializer_name to follow DRY
2018-05-14 17:54:33 -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
966b3509a4
update readme
2018-05-08 22:11:22 -07:00
Shishir Kakaraddi
63f905ab36
adds params to relatinoship blocks and tests
2018-05-08 22:11:22 -07:00
Shuhei Kitagawa
5b64e90956
Add tests for block relationship
2018-05-06 10:26:38 -07:00
Shuhei Kitagawa
e39de8c8c4
Enable to use block to define relationship
2018-05-06 10:26:38 -07:00
Shishir Kakaraddi
4523508c5b
inherits attributes, relationships and other settings from parent serializer
2018-05-05 19:12:45 -07:00
Zino
f4f289a0bc
Remove duplicate id_hash call from #record_hash
2018-05-03 20:50:03 -07:00
Zino
faa8fe6caf
Use string for serializer name
2018-05-02 10:22:22 -07:00
Shuhei Kitagawa
5d8e1ce9e7
Refactor tests for key_transform method
2018-05-01 23:28:07 -07:00
Carlos Solares
fe5ecb5b28
Use the serializer_key directly if it is not a symbol in relationships ( #198 )
2018-05-01 10:15:43 -07:00
Brandon Buck
a585497161
Add in options[:scope] and receiving scope in attribute blocks ( #153 )
2018-05-01 09:58:01 -07:00
Daniel Roux
7b48340a7c
Require 'logger' to avoid exception
2018-05-01 09:57:04 -07:00
Mark
2fe3b8ab99
Add ruby version requirement '>= 2.0.0'
...
With ruby 1.9.3 #serialized_json raises an exception:
```
NameError:
undefined local variable or method `caller_locations' for FastJsonapi::MultiToJson:Module
```
`Kernel#caller_locations` was added in ruby '2.0.0'
Source: https://docs.ruby-lang.org/en/2.2.0/NEWS-2_0_0.html
2018-05-01 09:56:09 -07:00
Shishir Kakaraddi
c943683141
second attempt to fix the has one name collision issue
2018-04-26 22:08:56 -07:00
Shishir Kakaraddi
901801fa80
checks if method is defined before defining it
2018-04-26 21:31:56 -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
Dillon Welch
a29b2c6184
Use alias for belongs_to because code is the same
...
Addresses https://github.com/Netflix/fast_jsonapi/issues/73
2018-04-26 10:37:44 -07:00
Dillon Welch
5428820d73
Add extra variables to cache to_sym calls
2018-04-26 10:37:44 -07:00
Dillon Welch
5b65608142
Move more of the logic inside the hash method
2018-04-26 10:37:44 -07:00
Dillon Welch
1f6fca522e
Compute relationship_hash on a separate line for clarity
2018-04-26 10:37:44 -07:00
Dillon Welch
e8f276c44f
Get rid of unnecessary freezes
2018-04-26 10:37:44 -07:00
Dillon Welch
f0cc24ed06
DRY up ObjectSerializer code
2018-04-26 10:37:44 -07:00
Konstantin
bc8996c04d
fix ActiveRecord ConnectionNotEstablished when ActiveRecord isnt required in a project
2018-04-21 15:26:31 -07:00
Shuhei Kitagawa
af0aed4414
Clean up group_context.rb
2018-04-21 14:54:41 -07:00
Ankit Gupta
0008c5a165
Making a version file to manage version. Also not adding date as it defaults to current UTC date
...
https://ruby-doc.org/stdlib-2.2.3/libdoc/rubygems/rdoc/Gem/Specification.html#method-i-date
2018-04-20 15:26:44 -07:00
Ankit gupta
5543a5c3e8
Merge pull request #178 from FanaHOVA/patch-1
...
Use proper casing on generator example
2018-04-20 10:56:36 -07:00
Alessio Fanelli
01ac9ccbe7
Use proper casing on generator example
...
`rails g Serializer` isn't a valid command, serializer shouldn't be capitalized.
2018-04-20 14:37:56 +02:00
Shuhei Kitagawa
4fdf5a221c
Enable to set race_condition_ttl for cache_options
2018-04-08 22:53:31 -07:00
Shuhei Kitagawa
fb7d01368a
Integrate tests for #set_id and #attribute to object_serializer_class_methods_spec
2018-03-29 17:22:51 -07:00