There might be situations where it's not possible to use a simple ActiveRecord::Relation. So, I was wondering if there is already a way to add the auto_include_context logic to a plain array of records?
Correct me if I'm wrong, but I didn't find any obvious out-of-the-box solution for this scenario.
I was thinking about sth like this:
records = Goldiloader::Collection.new([record_a])
records << record_b
records << record_c
records.map { _1.auto_include_context.models.count }
=> [3, 3, 3]
Would you be interested in a PR adding that functionality?
There might be situations where it's not possible to use a simple
ActiveRecord::Relation. So, I was wondering if there is already a way to add theauto_include_contextlogic to a plain array of records?Correct me if I'm wrong, but I didn't find any obvious out-of-the-box solution for this scenario.
I was thinking about sth like this:
Would you be interested in a PR adding that functionality?