diff options
| author | Alban Peignier | 2016-09-09 12:50:06 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2016-09-09 12:50:06 +0200 | 
| commit | bb12088efba8d755bf29d2edb0309b59953e14f5 (patch) | |
| tree | 3e253adb9143bd12744fa56343f0573f9c9c3c67 | |
| parent | e07c519f75e1a8572e65f61efebc875260237ca5 (diff) | |
| download | chouette-core-companies_line_referential_association.tar.bz2 | |
Use LineReferential group_of_lines in Referential methodscompanies_line_referential_association
| -rw-r--r-- | app/models/referential.rb | 9 | 
1 files changed, 3 insertions, 6 deletions
| diff --git a/app/models/referential.rb b/app/models/referential.rb index 1cb3e52ba..0063244e8 100644 --- a/app/models/referential.rb +++ b/app/models/referential.rb @@ -29,6 +29,7 @@ class Referential < ActiveRecord::Base    # validates_presence_of :line_referential    has_many :lines, through: :line_referential    has_many :companies, through: :line_referential +  has_many :group_of_lines, through: :line_referential    belongs_to :stop_area_referential    # validates_presence_of :stop_area_referential @@ -62,10 +63,6 @@ class Referential < ActiveRecord::Base      Chouette::Network.all    end -  def group_of_lines -    Chouette::GroupOfLine.all -  end -    def stop_areas      Chouette::StopArea.all    end @@ -218,5 +215,5 @@ class Referential < ActiveRecord::Base      # self.archived = false      update_column :archived_at, nil    end -   -end
\ No newline at end of file + +end | 
