diff options
| author | Alban Peignier | 2016-05-15 09:22:06 +0200 |
|---|---|---|
| committer | Alban Peignier | 2016-05-15 09:22:06 +0200 |
| commit | affbacfcd955230f66badb261dcc462cca9cd0b9 (patch) | |
| tree | 5410864baa11d3e5b24671cfb8f9258aaa833e62 /app/models/referential.rb | |
| parent | f5a3f0061fed4f8f51ebc0d556539a483626f76e (diff) | |
| download | chouette-core-affbacfcd955230f66badb261dcc462cca9cd0b9.tar.bz2 | |
Associate LineReferential to Referential. Create ReferentialLines to manage lines in Referential. Refs #826
Diffstat (limited to 'app/models/referential.rb')
| -rw-r--r-- | app/models/referential.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb index 1f0c5bcfd..55e7eff79 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -25,6 +25,10 @@ class Referential < ActiveRecord::Base belongs_to :organisation validates_presence_of :organisation + belongs_to :line_referential + # validates_presence_of :line_referential + has_many :lines, through: :line_referential + def slug_excluded_values if ! slug.nil? if slug.start_with? "pg_" @@ -47,10 +51,6 @@ class Referential < ActiveRecord::Base self.class.human_attribute_name(*args) end - def lines - Chouette::Line.all - end - def networks Chouette::Network.all end |
