[Fix #327] flashes messages can deal with Arrays
This commit is contained in:
parent
8d008a51d0
commit
3f90e82d09
3 changed files with 3 additions and 3 deletions
|
@ -49,7 +49,7 @@ class Backoffice::AvisController < ApplicationController
|
|||
avis = Avis.find(params[:id])
|
||||
redirect_to url_for(backoffice_dossier_path(avis.dossier_id))
|
||||
else
|
||||
flash[:alert] = gestionnaire.errors.full_messages.join('<br>')
|
||||
flash[:alert] = gestionnaire.errors.full_messages
|
||||
redirect_to url_for(avis_sign_up_path(params[:id], email))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ class Backoffice::PrivateFormulairesController < ApplicationController
|
|||
if champs_service_errors.empty?
|
||||
flash[:notice] = "Formulaire enregistré"
|
||||
else
|
||||
flash[:alert] = champs_service_errors.join('<br>').html_safe
|
||||
flash[:alert] = champs_service_errors
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ describe Backoffice::AvisController, type: :controller do
|
|||
|
||||
it { expect(created_gestionnaire).to be_nil }
|
||||
it { is_expected.to redirect_to avis_sign_up_path(avis_id, invited_email) }
|
||||
it { expect(flash.alert).to eq('Password : Le mot de passe est vide') }
|
||||
it { expect(flash.alert).to eq(['Password : Le mot de passe est vide']) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue