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
|
||||
|
||||
def update
|
||||
def reinvite
|
||||
Administrateur.find_inactive_by_id(params[:id]).invite!
|
||||
flash.notice = "Invitation renvoyée"
|
||||
redirect_to manager_administrateur_path(params[:id])
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
%h1.header__heading= content_for(:title)
|
||||
.header__actions
|
||||
- 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
|
||||
- page.attributes.each do |attribute|
|
||||
|
|
|
@ -6,7 +6,9 @@ Rails.application.routes.draw do
|
|||
post 'whitelist', on: :member
|
||||
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
|
||||
match "/delayed_job" => DelayedJobWeb, :anchor => false, :via => [:get, :post]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue