view components: silence with_variant deprecation warnings.

This commit is contained in:
evazion
2021-09-20 01:11:18 -05:00
parent d854bf6b53
commit 65c560c2d7

View File

@@ -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