Rename reinvite action in controller
This commit is contained in:
parent
14b8ac614f
commit
11b055e07c
3 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ module Manager
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def reinvite
|
||||||
Administrateur.find_inactive_by_id(params[:id]).invite!
|
Administrateur.find_inactive_by_id(params[:id]).invite!
|
||||||
flash.notice = "Invitation renvoyée"
|
flash.notice = "Invitation renvoyée"
|
||||||
redirect_to manager_administrateur_path(params[:id])
|
redirect_to manager_administrateur_path(params[:id])
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
%h1.header__heading= content_for(:title)
|
%h1.header__heading= content_for(:title)
|
||||||
.header__actions
|
.header__actions
|
||||||
- if page.resource.invitation_expired?
|
- if page.resource.invitation_expired?
|
||||||
= link_to "renvoyer l'invitation", manager_administrateur_path(page.resource), method: :patch, class: "button"
|
= link_to "renvoyer l'invitation", reinvite_manager_administrateur_path(page.resource), method: :post, class: "button"
|
||||||
|
|
||||||
%dl
|
%dl
|
||||||
- page.attributes.each do |attribute|
|
- page.attributes.each do |attribute|
|
||||||
|
|
|
@ -6,7 +6,9 @@ Rails.application.routes.draw do
|
||||||
post 'whitelist', on: :member
|
post 'whitelist', on: :member
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :administrateurs, only: [:index, :show, :new, :create, :update]
|
resources :administrateurs, only: [:index, :show, :new, :create] do
|
||||||
|
post 'reinvite', on: :member
|
||||||
|
end
|
||||||
|
|
||||||
authenticate :administration do
|
authenticate :administration do
|
||||||
match "/delayed_job" => DelayedJobWeb, :anchor => false, :via => [:get, :post]
|
match "/delayed_job" => DelayedJobWeb, :anchor => false, :via => [:get, :post]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue