1

I have a requirement in my application to use the urgent strategy. The Chewy document has a way to override the strategy in the application but every time a Chewy call is made, it has to be wrapped up in a code block. I am wondering if there is a simpler way to just override the strategy on initialisation.

I referred the Chewy documentation and have tried this but it is valid for only this particular call.

Chewy.strategy(:urgent) do
  City.popular.map(&:do_some_update_action!)
end
ishaan
  • 1,951
  • 1
  • 19
  • 31
mscode
  • 11
  • 3

0 Answers0