aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/referential_suite.rb
diff options
context:
space:
mode:
authorTeddy Wing2017-09-22 18:58:54 +0200
committerTeddy Wing2017-09-22 18:58:54 +0200
commitbeced2b5817da0082aa9f3af76581a524535d801 (patch)
treed8ccbd6db3e3cf6a3173b4e34e111e8a9f7af9ac /app/models/referential_suite.rb
parent16f01969fedd429b2c7916eafb19a8a9263bce81 (diff)
downloadchouette-core-beced2b5817da0082aa9f3af76581a524535d801.tar.bz2
Add `has_many` association between `Referential` and `ReferentialSuite`
`ReferentialSuite` has many `Referential`s. Need to add a foreign key column to the `referentials` table to allow that to work. Refs #3519
Diffstat (limited to 'app/models/referential_suite.rb')
-rw-r--r--app/models/referential_suite.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/referential_suite.rb b/app/models/referential_suite.rb
index c2f40913e..9fd25ef3f 100644
--- a/app/models/referential_suite.rb
+++ b/app/models/referential_suite.rb
@@ -1,4 +1,6 @@
class ReferentialSuite < ActiveRecord::Base
belongs_to :new, class_name: 'Referential'
belongs_to :current, class_name: 'Referential'
+
+ has_many :referentials
end