chore(schema): add official layout to attestation templates

This commit is contained in:
Colin Darie 2024-01-08 18:50:25 +01:00
parent 8ba78d1cfe
commit 1c3254755d
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
3 changed files with 6 additions and 2 deletions

View file

@ -17,8 +17,6 @@ class AttestationTemplate < ApplicationRecord
DOSSIER_STATE = Dossier.states.fetch(:accepte)
attribute :official_layout, :boolean, default: true
def attestation_for(dossier)
attestation = Attestation.new(title: replace_tags(title, dossier, escape: false))
attestation.pdf.attach(

View file

@ -0,0 +1,5 @@
class AddLayoutToAttestationTemplates < ActiveRecord::Migration[7.0]
def change
add_column :attestation_templates, :official_layout, :boolean, default: true, null: false
end
end

View file

@ -152,6 +152,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_26_071130) do
t.jsonb "json_body"
t.string "label_direction"
t.string "label_logo"
t.boolean "official_layout", default: true, null: false
t.integer "procedure_id"
t.text "title"
t.datetime "updated_at", precision: nil, null: false