Skip to content

Commit

Permalink
set prefix to instead of custom
Browse files Browse the repository at this point in the history
  • Loading branch information
aminedhobb committed Jan 29, 2025
1 parent 5f1c908 commit 2988811
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/concerns/user/creation_origin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module User::CreationOrigin
rdv_insertion_user_form: "rdv_insertion_user_form",
rdv_insertion_api: "rdv_insertion_api",
rdv_solidarites_webhook: "rdv_solidarites_webhook"
}, prefix: :created_through
}, prefix: true

belongs_to :created_from_structure, polymorphic: true, optional: true

Expand Down
2 changes: 1 addition & 1 deletion app/models/invitation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Invitation < ApplicationRecord
delegate :motif_category, :motif_category_name, to: :follow_up
delegate :model, to: :template, prefix: true

enum :format, { sms: "sms", email: "email", postal: "postal" }, prefix: :format
enum :format, { sms: "sms", email: "email", postal: "postal" }, prefix: true
enum :trigger, { manual: "manual", reminder: "reminder", periodic: "periodic" }

before_create :assign_uuid
Expand Down
2 changes: 1 addition & 1 deletion app/models/participation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Participation < ApplicationRecord
after_commit :notify_user, if: :should_notify_user?, on: [:create, :update]
after_commit :notify_external, if: :should_notify_external?, on: [:create, :update]

enum :created_by, { agent: "agent", user: "user", prescripteur: "prescripteur" }, prefix: :created_by
enum :created_by, { agent: "agent", user: "user", prescripteur: "prescripteur" }, prefix: true

delegate :starts_at, :motif_name,
:rdv_solidarites_url, :rdv_solidarites_rdv_id, :instruction_for_rdv,
Expand Down
2 changes: 1 addition & 1 deletion app/models/rdv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Rdv < ApplicationRecord
validate :follow_ups_motif_categories_are_uniq

enum :created_by, { agent: "agent", user: "user", file_attente: "file_attente", prescripteur: "prescripteur" },
prefix: :created_by
prefix: true

delegate :presential?, :by_phone?, :collectif?, to: :motif
delegate :department, :rdv_solidarites_organisation_id, to: :organisation
Expand Down

0 comments on commit 2988811

Please sign in to comment.