create generic label for procedure in controller instead of using a hook

This commit is contained in:
Lisa Durand 2024-10-15 11:12:21 +02:00
parent f68f4c88eb
commit e723c9e365
No known key found for this signature in database
GPG key ID: 0DF91F2CA1E8B816
9 changed files with 46 additions and 25 deletions

View file

@ -291,6 +291,12 @@ FactoryBot.define do
trait :accuse_lecture do
accuse_lecture { true }
end
trait :with_labels do
after(:create) do |procedure, _evaluator|
procedure.create_generic_procedure_labels
end
end
end
end