Skip to content

Commit

Permalink
keep mtm
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienMLD committed Mar 25, 2024
1 parent 5cf1d1e commit c36023d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/solicitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ def prevent_completed_solicitation_modification
end
end

# http://localhost:3000/aide-entreprise/accueil/demande/transport-mobilite/?mtm_campaign=entreprendre
# http://localhost:3000/aide-entreprise/accueil/demande/transport-mobilite/?mtm_campaign=entreprendre&mtm_kwd=F123
def redirect_entreprendre_solicitations
# Si la demande vient d'entreprendre et qu'elle n'a pas encore été redirigée
if (query_params[:mtm_campaign] == 'entreprendre') && !(session.dig('solicitation_form_info', 'redirected') == 'entreprendre')
session[:solicitation_form_info] ||= {}
session[:solicitation_form_info] ||= query_params
session[:solicitation_form_info][:redirected] = 'entreprendre'

redirect_to root_path
Expand Down

0 comments on commit c36023d

Please sign in to comment.