Merge pull request #10874 from tchak/deprecated-valid_action
chore: valid_action? -> accessible_action?
This commit is contained in:
commit
483076970c
4 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ as well as a link to its edit page.
|
|||
'Modifier',
|
||||
[:edit, namespace, page.resource],
|
||||
class: "button",
|
||||
) if valid_action?(:edit) && show_action?(:edit, page.resource) %>
|
||||
) if accessible_action?(:edit, page.resource) && show_action?(:edit, page.resource) %>
|
||||
|
||||
<%= link_to 'Réinviter', reinvite_manager_instructeur_path(instructeur), method: :post, class: 'button' %>
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ It renders the `_table` partial to display details about the resources.
|
|||
),
|
||||
[:new, namespace, page.resource_path.to_sym],
|
||||
class: "button",
|
||||
) if valid_action?(:new) && show_action?(:new, new_resource) %>
|
||||
) if accessible_action?(:new, page.resource) && show_action?(:new, new_resource) %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ as well as a link to its edit page.
|
|||
t("administrate.actions.edit_resource", name: page.page_title),
|
||||
[:edit, namespace, page.resource],
|
||||
class: "button",
|
||||
) if valid_action? :edit %>
|
||||
) if accessible_action?(:edit, page.resource) %>
|
||||
|
||||
<%= link_to 'Aperçu', apercu_admin_procedure_path(procedure), class: 'button' %>
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ It renders the `_table` partial to display details about the resources.
|
|||
),
|
||||
[:new, namespace, page.resource_path.to_sym],
|
||||
class: "button",
|
||||
) if valid_action?(:new) && show_action?(:new, new_resource) %>
|
||||
) if accessible_action?(:new, page.resource) && show_action?(:new, new_resource) %>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
Loading…
Reference in a new issue