Skip to content

Commit

Permalink
Use new helper instead of deprecated ones
Browse files Browse the repository at this point in the history
  • Loading branch information
francois-ferrandis committed Nov 9, 2022
1 parent a025771 commit 07b1063
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/super_admins/agents/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ header.main-content__header role="banner"
=> link_to "Inviter", invite_super_admins_agent_path(page.resource), method: :post, class: "button"
- if sign_in_as_allowed?
=> link_to "Se logger en tant que", sign_in_as_super_admins_agent_path(page.resource), class: "button"
=> link_to(t("administrate.actions.edit_resource", name: page.page_title), [:edit, namespace, page.resource], class: "button") if valid_action?(:edit) && show_action?(:edit, page.resource)
=> link_to(t("administrate.actions.edit_resource", name: page.page_title), [:edit, namespace, page.resource], class: "button") if accessible_action?(page.resource, :edit)
=> link_to("Migrer", new_super_admins_agent_migration_path(agent_id: page.resource.id), class: "button")
section.main-content__body
dl
Expand Down
2 changes: 1 addition & 1 deletion app/views/super_admins/application/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
t("administrate.actions.edit_resource", name: page.page_title),
[:edit, namespace, page.resource],
class: "button",
) if valid_action?(:edit) && show_action?(:edit, page.resource) %>
) if accessible_action?(page.resource, :edit) %>
</div>
</header>

Expand Down
2 changes: 1 addition & 1 deletion app/views/super_admins/users/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ header.main-content__header role="banner"
div
- if sign_in_as_allowed?
=> link_to "Se logger en tant que", sign_in_as_super_admins_user_path(page.resource), class: "button"
=> link_to(t("administrate.actions.edit_resource", name: page.page_title),[:edit, namespace, page.resource], class: "button") if valid_action?(:edit) && show_action?(:edit, page.resource)
=> link_to(t("administrate.actions.edit_resource", name: page.page_title),[:edit, namespace, page.resource], class: "button") if accessible_action?(page.resource, :edit)
section.main-content__body
dl
- page.attributes.each do |attribute|
Expand Down

0 comments on commit 07b1063

Please sign in to comment.