only and except options that can be sent to the serializer's new method. They can also be arguments to the as_json method on the model. These options are possibly nested.
Adds the possibility to pass the context as an argument to the scope lambda / proc on a many association. Great for filtering by language, etc.
Type of change
Please delete options that are not relevant.
[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing tests pass locally with my changes
Description
This PR introduces two things:
only
andexcept
options that can be sent to the serializer'snew
method. They can also be arguments to theas_json
method on the model. These options are possibly nested.context
as an argument to thescope
lambda / proc on amany
association. Great for filtering by language, etc.Type of change
Please delete options that are not relevant.
Checklist: