I'm working with some complex queries using the dynamic find_all method and reached to a point where sending a block to that find_all method would really simplify my code.
Is there any plugin or work in-progress dealing with this?
In simple terms, I'd like to do something like:
@products = Product.find_all_by_ids(ids, .....) do |p|
# do something to each product like
p.stock += 10
end
Obviously, any other guide or better way of doing this would be greatly appreciated.