Using acts_as_taggable_on to find a models instances with certain tags is done by something like this:
Ninja.tagged_with(["invincibility,uber-strength", any: true)
However, what if I have 2million ninjas in my ninja directory and want to run a job on many of them.
I could find in batches but I don't quite understand how to do this with tags on a model. For example:
Ninja.all.find_in_batches(batch_size:1000) do |group|
group.each do |ninja|
ninja.battle!
end
end
Is there a way to batch the tagged with query?