Open julianhirt opened 6 years ago
Hi @julianhirt – it is planned but I'm rather busy at the moment so can't really give an ETA on the docs. In the meantime, feel free to ask any question you may have (either here or on gitter).
@beauby I couldn't find any doc on how to setup it with rails. I have few questions:
Rails.cache
?controller#render jsonapi: ...
or I just define some option in my serializers?Any updates on this?
Following up on this as well... I'm trying to implement caching by adding the "cache: Rails.cache" option to "render jsonapi: ...", but seeing this error:
NoMethodError (undefined method `as_jsonapi' for nil:NilClass Did you mean? as_json):
same for me, adding
config.jsonapi_cache = lambda {
Rails.cache
}
to the initializer
The error is fixed with this commit https://github.com/jsonapi-rb/jsonapi-renderer/commit/f154799ff0d0ea8132b4e7acd632060cb0f7d22c, but it was not released. ☹️
Hi there, I do find the default values for jsonapi_cache and default initializers, but is it possible to add some documentation? I have a very static json and it would be awesome to have it cached somewhere. Thanks in advance!