Sometimes you need to iterate over a ton of items and you don't want the overhead of creating AR objects out of all of them. Hell, you only need a few things! Well, #pluck has your back.
But what if you want to iterate over many tonnes of items?
Pluck in batches to the rescue!
This isn't the exact code that I use in my code base, but it is damn close.
Enjoy!
I think this is necessary in ActiveRecord core. Have you tried seeing if the core team is interested in this?