aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette/line.rb
diff options
context:
space:
mode:
authorXinhui2017-02-03 10:54:32 +0100
committerXinhui2017-02-03 10:54:44 +0100
commita8a096c2f0731d3a7ed5a25516e012d988fc078d (patch)
tree29fa0cb549bd20a78d3a1f1bfa1c3964e464031f /app/models/chouette/line.rb
parentca780b861fe316c07eb21c0cce5638d1beafdaa8 (diff)
downloadchouette-core-a8a096c2f0731d3a7ed5a25516e012d988fc078d.tar.bz2
Lines has_array_of secondary_companies
Refs #2490
Diffstat (limited to 'app/models/chouette/line.rb')
-rw-r--r--app/models/chouette/line.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/chouette/line.rb b/app/models/chouette/line.rb
index 6c5d8501f..27a37a7f4 100644
--- a/app/models/chouette/line.rb
+++ b/app/models/chouette/line.rb
@@ -14,6 +14,9 @@ class Chouette::Line < Chouette::ActiveRecord
belongs_to :company
belongs_to :network
+
+ has_array_of :secondary_companies, class_name: 'Chouette::Company'
+
has_many :routes, :dependent => :destroy
has_many :journey_patterns, :through => :routes
has_many :vehicle_journeys, :through => :journey_patterns