invite: rename 'email' to 'invite_email'
This commit is contained in:
parent
030562a32f
commit
9541e781bb
3 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ class InvitesController < ApplicationController
|
|||
before_action :ensure_user_signed_in
|
||||
|
||||
def create
|
||||
email = params[:email].downcase
|
||||
email = params[:invite_email].downcase
|
||||
|
||||
invite = InviteUser.create(
|
||||
dossier: current_user.dossiers.find(params[:dossier_id]),
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
|
||||
%li
|
||||
= form_tag invites_dossier_path(dossier_id: @facade.dossier.id), method: :post, class: 'form-inline', id: 'send-invitation' do
|
||||
= text_field_tag :email, '', class: 'form-control', placeholder: 'Envoyer une invitation', id: 'invitation-email'
|
||||
= text_field_tag :invite_email, '', class: 'form-control', placeholder: 'Envoyer une invitation', id: 'invite_email'
|
||||
= submit_tag 'Ajouter', class: 'btn btn-success', data: { confirm: "Envoyer l'invitation ?" }
|
||||
|
|
|
@ -11,7 +11,7 @@ describe InvitesController, type: :controller do
|
|||
sign_in signed_in_profile
|
||||
end
|
||||
|
||||
subject { post :create, params: { dossier_id: dossier.id, email: email } }
|
||||
subject { post :create, params: { dossier_id: dossier.id, invite_email: email } }
|
||||
|
||||
context "when gestionnaire is signed_in" do
|
||||
let(:signed_in_profile) { create(:gestionnaire) }
|
||||
|
|
Loading…
Reference in a new issue