MoskitoHero / barley

Barley is a fast and efficient ActiveModel serializer
MIT License
80 stars 3 forks source link

Add a `scope` argument to the `many` definition #7

Closed MoskitoHero closed 4 months ago

MoskitoHero commented 4 months ago

Description

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.

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

Benchmarks

Barley is fast, and should be kept as fast as possible. Provide benchmarks related to speed and memory footprint.

Checklist: