Enable add descriptions to cadastres
This commit is contained in:
parent
daa20b0b6d
commit
dfc46a8736
4 changed files with 26 additions and 26 deletions
|
@ -25,7 +25,7 @@ class Champ < ApplicationRecord
|
|||
|
||||
# We declare champ specific relationships (Champs::CarteChamp, Champs::SiretChamp and Champs::RepetitionChamp)
|
||||
# here because otherwise we can't easily use includes in our queries.
|
||||
has_many :geo_areas, dependent: :destroy
|
||||
has_many :geo_areas, -> { order(:created_at) }, dependent: :destroy, inverse_of: :champ
|
||||
belongs_to :etablissement, optional: true, dependent: :destroy
|
||||
has_many :champs, -> { ordered }, foreign_key: :parent_id, inverse_of: :parent, dependent: :destroy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue