add belongs_to zone for procedure
This commit is contained in:
parent
5b8d872b6e
commit
561f6fb274
4 changed files with 12 additions and 1 deletions
|
@ -48,6 +48,7 @@
|
|||
# parent_procedure_id :bigint
|
||||
# published_revision_id :bigint
|
||||
# service_id :bigint
|
||||
# zone_id :bigint
|
||||
#
|
||||
|
||||
class Procedure < ApplicationRecord
|
||||
|
@ -85,6 +86,7 @@ class Procedure < ApplicationRecord
|
|||
belongs_to :parent_procedure, class_name: 'Procedure', optional: true
|
||||
belongs_to :canonical_procedure, class_name: 'Procedure', optional: true
|
||||
belongs_to :service, optional: true
|
||||
belongs_to :zone, optional: true
|
||||
|
||||
def active_revision
|
||||
brouillon? ? draft_revision : published_revision
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue