Merge pull request #9167 from tchak/use-persisted
refactor: use persisted? instead of created_at.present?
This commit is contained in:
commit
c23f1f713f
2 changed files with 2 additions and 2 deletions
|
@ -63,6 +63,6 @@ class Dossiers::MessageComponent < ApplicationComponent
|
|||
end
|
||||
|
||||
def highlight?
|
||||
commentaire.created_at.present? && @messagerie_seen_at&.<(commentaire.created_at)
|
||||
commentaire.persisted? && @messagerie_seen_at&.<(commentaire.created_at)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
= f.number_field :duree_conservation_dossiers_dans_ds, { class: 'fr-input', placeholder: '6', required: true, max: f.object.max_duree_conservation_dossiers_dans_ds }
|
||||
|
||||
- if @procedure.created_at.present?
|
||||
- if @procedure.persisted?
|
||||
= render Dsfr::InputComponent.new(form: f, attribute: :lien_site_web, input_type: :text_field, opts: {}, required: false)
|
||||
|
||||
= render Dsfr::CalloutComponent.new(title: "Cadre juridique") do |c|
|
||||
|
|
Loading…
Reference in a new issue