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
Benjamin Fleischer
06fcd34807
Follows https://github.com/rails-api/active_model_serializers/pull/2100
2019-04-23 04:33:56 +06: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
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
Joe Meredith
c6a14c9eac
Fail if collection type cannot be inferred with json adapter ( #2210 )
2017-10-30 13:37:37 -04:00
Geremia Taglialatela
4f78319219
Fix RuboCop offence
2017-09-17 19:33:05 +02:00
Darren Cheng
967ff8dcc0
Patch Enumerator.new ArgumentError.
2017-08-28 19:38:08 -07:00
Christian
a89e78c655
Allow referencing sideloaded include by key. ( #2136 )
...
* If a `key` is set on the reflection use the `key` instead of `name`.
This ensures that associations with a key set are still included.
2017-05-18 15:59:14 -05:00
Benjamin Fleischer
dff621e174
Bump to v0.10.6
2017-05-01 10:59:14 -05:00
Benjamin Fleischer
96028a7b99
Document new reflection options; support :foreign_key
2017-05-01 10:18:13 -05:00
Benjamin Fleischer
c9b0e4e6ae
Do not calculate cache_key unless caching
2017-04-30 23:03:18 -05:00
Benjamin Fleischer
81a13c4b32
Merge pull request #2093 from bf4/undef_unneeded_kernel_methods
...
Undef problematic Object methods
2017-04-30 16:51:19 -07:00
Benjamin Fleischer
6e41528515
Skip eval relationships object on belongs to
2017-04-30 18:32:08 -05:00
Benjamin Fleischer
320596b75b
Undef problematic Object methods
2017-04-30 17:56:13 -05:00
Benjamin Fleischer
5e01a93fc0
Update comments regarding lazy_association and TODOs
2017-04-30 15:09:18 -05:00
Benjamin Fleischer
ff5ab21a45
Make Association totally lazy
2017-04-23 18:40:46 -05:00
Benjamin Fleischer
7697d9f5ec
Refactor: introduce lazy association
2017-04-23 17:53:00 -05:00
Benjamin Fleischer
34d55e4729
Remove extra reflection classes
2017-04-23 17:46:55 -05:00
Benjamin Fleischer
7d8fb1606b
Cleanup
2017-04-23 17:42:30 -05:00
Benjamin Fleischer
ee69293c8f
Refactor reflection building serializer class
2017-04-23 15:21:29 -05:00
Benjamin Fleischer
079b3d6841
Refactor collection reflection
2017-04-23 14:53:45 -05:00
Benjamin Fleischer
1bddd9fdb5
Refactor
2017-04-23 14:47:55 -05:00
Benjamin Fleischer
fad4ef1046
Refactor reflection building of association
2017-04-23 14:19:04 -05:00
Benjamin Fleischer
cb16457bb3
Make reflection explicitly dependents on association
2017-04-23 14:18:30 -05:00
Benjamin Fleischer
ba2aa1fdfd
Remove dead comments
2017-04-23 14:18:09 -05:00