route: allow standard path helper to work
for example `form_with model: [:instructeur, procedure, export_template]`
This commit is contained in:
parent
248da3a896
commit
30e79b735d
2 changed files with 9 additions and 6 deletions
|
@ -22,5 +22,5 @@
|
|||
= link_to download_export_path(export_template_id: export_template.id), role: 'menuitem', data: { turbo_method: :post, turbo: true } do
|
||||
= "Exporter à partir du modèle #{export_template.name}"
|
||||
- menu.with_item do
|
||||
= link_to new_instructeur_export_template_path(procedure_id: params[:procedure_id]), role: 'menuitem' do
|
||||
= link_to [:new, :instructeur, @procedure, :export_template], role: 'menuitem' do
|
||||
Ajouter un modèle d'export
|
||||
|
|
|
@ -443,14 +443,17 @@ Rails.application.routes.draw do
|
|||
#
|
||||
|
||||
scope module: 'instructeurs', as: 'instructeur' do
|
||||
resources :procedures, only: [] do
|
||||
resources :export_templates, only: [:new, :create, :edit, :update, :destroy] do
|
||||
collection do
|
||||
get 'preview'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
resources :procedures, only: [:index, :show], param: :procedure_id do
|
||||
member do
|
||||
resources :archives, only: [:index, :create]
|
||||
resources :export_templates, only: [:new, :create, :edit, :update, :destroy] do
|
||||
collection do
|
||||
get 'preview'
|
||||
end
|
||||
end
|
||||
|
||||
resources :groupes, only: [:index, :show], controller: 'groupe_instructeurs' do
|
||||
resource :contact_information
|
||||
|
|
Loading…
Reference in a new issue