0
0
Fork 0

Change root Chewy strategy to emit a warning instead of erroring out in production mode (#24327)

This commit is contained in:
Claire 2023-04-03 15:05:39 +02:00 committed by GitHub
parent 4909c2e718
commit 5c499f54e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
module Chewy
class Strategy
class BypassWithWarning < Base
def update(...)
Rails.logger.warn 'Chewy update without a root strategy' unless @warning_issued
@warning_issued = true
end
end
end
end