views: fix deprecated calls to ViewComponent#with_variant.

This commit is contained in:
evazion
2022-04-13 00:00:25 -05:00
parent f69847fc59
commit 363cf2014b
20 changed files with 71 additions and 53 deletions

View File

@@ -7,12 +7,4 @@ 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