Change how renderer output is converted to JSON#133
Merged
remear merged 4 commits intojsonapi-rb:masterfrom Oct 5, 2021
Merged
Change how renderer output is converted to JSON#133remear merged 4 commits intojsonapi-rb:masterfrom
remear merged 4 commits intojsonapi-rb:masterfrom
Conversation
Update the railtie to fix issues with the way renderer output is converted into a JSON string in the controller. Cached and non-cached resources need slightly different handling, so make a logical check to tell the difference and use the appropriate method.
These specs test the caching version of the render call more thoroughly. - Assert that the expected data structure is stored in the cache - Assert that the response is the same whether using the caching version of this call or the regular one
- Git ignore tmp cache files - Add pry-byebug to dev dependencies
Change how renderer output is converted to JSON
Member
|
Thanks for this! |
|
@remear Can we release a new version of the gem to have this commit? |
Member
|
My intent was to first fix the CI to ensure a stable release, of which there's a PR up I need to go review, then get this shipped. Sadly, I haven't had as much time to work on this as I'd like. I'll try to wrangle some time to get this out soon. |
Closed
|
Seconding this - I'm dealing with the same JSON serialisation double encoding problem since I've tried to add caching, would love to see this released 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
datafield.Changes proposed in this pull request
Update the railtie to fix issues with the way renderer output is converted into a JSON string in the controller.
Cached and non-cached resources need slightly different handling, so make a logical check to tell the difference and use the appropriate method.