This adds a scope argument to the many definition, that can either be a named scope defined on the associated model, or a lambda that will be called on the association.
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 (included)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
[x] Added relevant tests to the serializer_test.rb file
Benchmarks
Barley is fast, and should be kept as fast as possible. Provide benchmarks related to speed and memory footprint.
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 adds a
scope
argument to themany
definition, that can either be a named scope defined on the associated model, or a lambda that will be called on the association.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
serializer_test.rb
fileBenchmarks
Barley is fast, and should be kept as fast as possible. Provide benchmarks related to speed and memory footprint.
Checklist: