From 65c560c2d7c39767631f266b3e93a7e28fa24c9a Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 20 Sep 2021 01:11:18 -0500 Subject: [PATCH] view components: silence with_variant deprecation warnings. --- app/components/application_component.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/components/application_component.rb b/app/components/application_component.rb index ffc2976c7..59e84c969 100644 --- a/app/components/application_component.rb +++ b/app/components/application_component.rb @@ -5,4 +5,12 @@ class ApplicationComponent < ViewComponent::Base def policy(subject) Pundit.policy!(current_user, subject) end + + # XXX Silence warnings about `with_variant` being deprecated until we can fix it. + # DEPRECATION WARNING: `with_variant` is deprecated and will be removed in ViewComponent v3.0.0 + def with_variant(...) + ActiveSupport::Deprecation.silence do + super(...) + end + end end