Merge pull request #9167 from tchak/use-persisted

refactor: use persisted? instead of created_at.present?
This commit is contained in:
Paul Chavard 2023-06-12 16:13:06 +00:00 committed by GitHub
commit c23f1f713f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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|