feat(champ): can condition on other option

This commit is contained in:
Paul Chavard 2022-08-02 12:57:41 +02:00
parent a53688ce23
commit a24885c2ee
9 changed files with 39 additions and 16 deletions

View file

@ -428,15 +428,15 @@ class ProcedureRevision < ApplicationRecord
}
end
end
if from_type_de_champ.drop_down_other != to_type_de_champ.drop_down_other
if from_type_de_champ.drop_down_other? != to_type_de_champ.drop_down_other?
changes << {
model: :type_de_champ,
op: :update,
attribute: :drop_down_other,
label: from_type_de_champ.libelle,
private: from_type_de_champ.private?,
from: from_type_de_champ.drop_down_other,
to: to_type_de_champ.drop_down_other,
from: from_type_de_champ.drop_down_other?,
to: to_type_de_champ.drop_down_other?,
stable_id: from_type_de_champ.stable_id
}
end