Call remove_drop_down_list on before_save

This commit is contained in:
Paul Chavard 2020-07-08 14:40:12 +02:00
parent 3c9cc6c070
commit a74e52c828
2 changed files with 27 additions and 1 deletions

View file

@ -82,7 +82,7 @@ class TypeDeChamp < ApplicationRecord
before_validation :check_mandatory
before_save :remove_piece_justificative_template, if: -> { type_champ_changed? }
before_validation :remove_drop_down_list, if: -> { type_champ_changed? }
before_save :remove_drop_down_list, if: -> { type_champ_changed? }
before_save :remove_repetition, if: -> { type_champ_changed? }
def valid?(context = nil)