Explicit foreign_key on CarteChamp

This commit is contained in:
Paul Chavard 2018-10-17 13:03:06 +03:00
parent 744117537b
commit df73e442e9

View file

@ -1,5 +1,5 @@
class Champs::CarteChamp < Champ
has_many :geo_areas, dependent: :destroy
has_many :geo_areas, foreign_key: :champ_id, dependent: :destroy
# We are not using scopes here as we want to access
# the following collections on unsaved records.