Add some params to track forms submissions

This commit is contained in:
Chaïb Martinez 2018-11-21 15:16:35 +01:00 committed by gregoirenovel
parent b0da4144bd
commit 0e8d235800
3 changed files with 4 additions and 4 deletions

View file

@ -18,7 +18,7 @@ class DemandesController < ApplicationController
demande_params[:deadline]
)
flash.notice = 'Votre demande a bien été enregistrée, nous vous contacterons rapidement.'
redirect_to administration_path
redirect_to administration_path(formulaire_demande_compte_admin_submitted: true)
end
private

View file

@ -13,7 +13,7 @@ class SupportController < ApplicationController
elsif create_conversation
flash.notice = "Votre message a été envoyé."
redirect_to root_path
redirect_to root_path(formulaire_contact_general_submitted: true)
else
setup_context
flash.now.alert = "Une erreur est survenue. Vous pouvez nous contactez à #{helpers.mail_to(CONTACT_EMAIL)}."

View file

@ -61,7 +61,7 @@ describe SupportController, type: :controller do
}
expect(flash[:notice]).to match('Votre message a été envoyé.')
expect(response).to redirect_to root_path
expect(response).to redirect_to root_path(formulaire_contact_general_submitted: true)
end
context "with dossier" do
@ -80,7 +80,7 @@ describe SupportController, type: :controller do
}
expect(flash[:notice]).to match('Votre message a été envoyé.')
expect(response).to redirect_to root_path
expect(response).to redirect_to root_path(formulaire_contact_general_submitted: true)
end
context "en_construction" do