Tashiro
8fe1aee255
add raise_cannot_infer_root_key_error to config
2021-02-11 20:14:14 +09:00
Gregory Ray
1bbd7283ce
this fixes a bug where an invalid next link appears if the current page is greater than total_pages
...
adding tests
fixing rubocop violation
2021-01-02 10:52:12 -08:00
Benjamin Fleischer
6d651bc9e3
Bump to 0.10.12
2020-12-10 12:42:12 -05:00
Ritikesh
f2643c1e3b
Update rails dependency to < 6.2
2020-12-09 03:12:21 +05:30
Benjamin Fleischer
dac067fec4
Bump version
2020-12-04 08:59:17 -06:00
Ritikesh
29d8be452f
remove explicit require for thread_safe
2020-10-12 19:38:05 +05:30
Wasif Hossain
64c7fee7a8
Code cleanup ( #2369 )
...
* Lint travis.yml on https://config.travis-ci.com/explore
* Replace deprecated 'thread_safe' with 'concurrent-ruby' alternative
'thread_safe' gem is now deprecated and merged into 'concurrent-ruby'.
Ref: 52e5f373a9 (diff-42d5a45da331eaa07d2b315bd3c9e738)
* Fix deprecation warning for Ruby 2.7
https://bugs.ruby-lang.org/issues/15539
* Remove a TODO tag that is already resolved
2020-01-02 21:53:59 -05:00
Alex Zherdev
1c028785eb
Introduce use_sha1_digests config option
2019-10-16 13:06:45 -07:00
Alex Zherdev
5d3f56f0a4
Use SHA1 instead of MD5 for caching
2019-10-15 13:12:36 -07:00
Wasif Hossain
2581fe0362
Lookup fieldset using either string or symbol
2019-07-17 15:51:15 +06:00
Wasif Hossain
433c0c646f
Bump version to 0.10.10
2019-07-13 15:30:49 +06:00
Rafael Gaspar
beffbb2bd3
Follows inheritance with a namespace
...
Co-authored-by: Rafael Gaspar <rafael.gaspar@me.com>
Co-authored-by: Darryl Pogue <darryl@dpogue.ca>
Co-authored-by: Artin Boghosian <artinboghosian@gmail.com>
2019-07-10 11:41:32 -07:00
Mark Havekes
28a172e66a
return nil if id is nil
2019-06-11 14:42:13 +02:00
Mark Havekes
4b0c230d76
add failing test and suggestion
2019-06-04 10:27:02 +02:00
Wasif Hossain
a9cb097109
Refactoring
2019-04-23 04:34:02 +06:00
Benjamin Fleischer
06fcd34807
Follows https://github.com/rails-api/active_model_serializers/pull/2100
2019-04-23 04:33:56 +06:00
Kyle Keesling
6fbeb9a93e
Fix deprecation warnings on Rails 6
...
takes into account suggestions from @bf4
2019-03-13 09:52:54 -04:00
Benjamin Fleischer
bb0f9d088d
Bump version to 0.10.9
2019-02-08 11:25:53 -06:00
cintamani
15b7974fac
Merge pull request #2288 from cintamani/patch-1
...
Change the fetch method to deal with recyclable key cache strategy
2019-02-08 12:14:03 +00:00
Krzysztof Rybka
209834dc49
Performance and memory usage fixes ( #2309 )
...
* Use select and reject instead of partition.map
* Sort adapters keys in place
* Just select from options
* Add changelog entry
2019-01-29 15:38:11 -06:00
cintamani
141feeb259
Revert "Update caching.rb"
...
This reverts commit f31430a8185533246638a7cfebba325f0ac9b0fa.
2019-01-29 16:00:18 +00:00
cintamani
427dd05a73
Revert "Update caching.rb"
...
This reverts commit c6f34eb9e9df86b568b9463e2ea8c26f0f43a838.
2019-01-29 16:00:18 +00:00
cintamani
bd53d9b213
Update caching.rb
2019-01-29 16:00:18 +00:00
cintamani
b0039e3758
Update caching.rb
2019-01-29 16:00:18 +00:00
cintamani
be5fbf3d54
Use #cache_key_with_key when available
...
In order to keep compatibility between the AMS cache feature and with Rails > 5.1 cache versioning, we have to use the `cache_key_with_version`.
**NOTE** - This is a quick fix to the issue, if there will be future plans a proper cache versioning with recyclable key needs to be implemented.
More info: https://github.com/rails-api/active_model_serializers/issues/2287
2019-01-29 16:00:18 +00:00
Benjamin Fleischer
c6c3927e00
Merge pull request #2307 from faucct/bugfix/double-evaluation-of-object
...
Reevaluation of object
2019-01-10 11:58:27 -06:00
Nikita Sokolov
a39794df5b
LazyAssociation#object should not reevaluate reflection values
2019-01-09 09:52:38 +03:00
Krzysztof Rybka
873cf4add2
Add frozen_string_literal pragma to ruby files
2018-12-17 16:54:56 +01:00
Benjamin Fleischer
bc4805cbc1
Bump version to v0.10.8
2018-11-01 16:24:08 -05:00
Benjamin Fleischer
b358271ef5
Note that we dup the entire reflection instance
2018-11-01 14:21:59 -05:00
LongCB
c7e847fc72
Fix thread unsafe behavior
2018-11-01 14:20:47 -05:00
Konstantin Munteanu
572f11b7e0
value is always a link
2018-10-25 09:54:36 +02:00
Konstantin Munteanu
ca6c009273
typos
2018-10-25 09:45:34 +02:00
Konstantin Munteanu
0d3999c36d
Support conditions in link statements
2018-10-25 09:45:34 +02:00
Benjamin Fleischer
4b2b9ef730
Merge pull request #2297 from vnbrs/patch-1
...
Remove unnecessary line break from exception message
2018-10-24 17:02:19 -05:00
Vinicius Brasil
bcf21ea0a6
Remove unnecessary line break from exception message
...
This removes the unnecessary line break from the exception message. Example:
```
Cannot infer root key from collection type. Please\n
specify the root or each_serializer option, or render a JSON String
```
2018-10-24 14:10:59 -03:00
Dzmitry
db4e5267fd
Fix the bug that serializer could not be found if the association's serializer is namespaced but the model is not
...
[fix #2295 ]
2018-10-20 15:42:11 +03:00
Fabian Mersch
65313b901b
Remove obsolete autoloads
2018-10-11 21:32:12 +02:00
Fabian Mersch
2a8b9f4105
Eager load modules on boot
...
Using ActiveModelSerializers with a threaded web server eg. Puma
uninitialized constant errors are thrown. Leaving this article for
reference:
http://blog.plataformatec.com.br/2012/08/eager-loading-for-greater-good/ .
2018-10-11 21:32:12 +02:00
quake wang
a9ea81a831
resolve collection cache error
2017-11-19 11:33:48 -06:00
Benjamin Fleischer
ca531789c3
Bump to 0.10.7; update changelog
2017-11-14 20:50:51 -06:00
Benjamin Fleischer
3dd6cccb4d
Fix 0.10.6 regression; make using belongs_to on self opt-in
2017-11-13 08:36:23 -06:00
Benjamin Fleischer
9745a2f735
Fix: ResourceIdentifier.for_type_with_id can serialize unpersisted resources
2017-10-31 14:47:55 -05:00
Benjamin Fleischer
5916014b48
Fix: resource object identifier with nil id excludes id
2017-10-31 14:34:30 -05:00
Benjamin Fleischer
e3480345e3
Merge pull request #2211 from rails-api/polymorphic_relationships_require_serializer_instance
...
JSON:API relationship tests no longer show v0.10.5 regression
2017-10-31 13:49:18 -05:00
Joe Meredith
c6a14c9eac
Fail if collection type cannot be inferred with json adapter ( #2210 )
2017-10-30 13:37:37 -04:00
Benjamin Fleischer
a0de45a4d8
Fix JSON:API: for_type_and_id should always inflect_type
...
Should Serializer._type ever be inflected?
Right now, it won't be, but association.serializer._type will be inflected.
That's the current behavior.
2017-10-29 21:23:48 -05:00
Benjamin Fleischer
cf29db34c6
Fix JSON:API polymorphic type regression from v0.10.5
2017-10-29 20:15:15 -05:00
Benjamin Fleischer
5e1e138d47
Refactor ResourceIdentifier
2017-10-29 17:13:34 -05:00
Dennis Stumm
4d7c2457d7
Fix deserialization of polymorphic relationships ( #2200 )
...
* Classify the relationship type for polymorphic associations
2017-10-07 17:03:38 -05:00