Use new module_parent and module_parents methods

We were getting some deprecation warnings:

DEPRECATION WARNING: `Module#parent` has been renamed to
`module_parent`. `parent` is deprecated and will be removed in Rails
6.1.

DEPRECATION WARNING: `Module#parents` has been renamed to
`module_parents`. `parents` is deprecated and will be removed in Rails
6.1.
This commit is contained in:
Javi Martín
2021-09-18 14:01:53 +02:00
parent 7fe2309762
commit 7c8e3788ec
5 changed files with 13 additions and 13 deletions

View File

@@ -22,7 +22,7 @@
<% end %>
<% if feature?(:legislation) %>
<li class="<%= "is-active" if controller.class.parent == Admin::Legislation %>">
<li class="<%= "is-active" if controller.class.module_parent == Admin::Legislation %>">
<%= link_to t("admin.menu.legislation"), admin_legislation_processes_path, class: "legislation-link" %>
</li>
<% end %>
@@ -69,7 +69,7 @@
banners_link,
information_texts_link,
documents_link,
class: ("is-active" if customization? && controller.class.parent != Admin::Poll::Questions::Answers)
class: ("is-active" if customization? && controller.class.module_parent != Admin::Poll::Questions::Answers)
) %>
</li>