Cache champ attributes
This commit is contained in:
parent
731cd56594
commit
61d2edc42e
1 changed files with 2 additions and 2 deletions
|
@ -57,11 +57,11 @@ class PrefillParams
|
|||
end
|
||||
|
||||
def prefillable?
|
||||
champ.prefillable? && valid?
|
||||
champ.prefillable? && valid? && champ_attributes.present?
|
||||
end
|
||||
|
||||
def champ_attributes
|
||||
TypesDeChamp::PrefillTypeDeChamp
|
||||
@champ_attributes ||= TypesDeChamp::PrefillTypeDeChamp
|
||||
.build(champ.type_de_champ, dossier.revision)
|
||||
.to_assignable_attributes(champ, value)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue