Rename reinvite action in controller

This commit is contained in:
Mathieu Magnin 2018-01-18 10:04:34 +01:00
parent 14b8ac614f
commit 11b055e07c
3 changed files with 5 additions and 3 deletions

View file

@ -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])

View file

@ -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|

View file

@ -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]