aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/referential.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/referential.rb')
-rw-r--r--app/models/referential.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/referential.rb b/app/models/referential.rb
index f58647136..dbc7b76e7 100644
--- a/app/models/referential.rb
+++ b/app/models/referential.rb
@@ -42,6 +42,8 @@ class Referential < ActiveRecord::Base
has_many :stop_areas, through: :stop_area_referential
belongs_to :workbench
+ scope :ready, -> { where(ready: true) }
+
def lines
if metadatas.blank?
workbench ? workbench.lines : associated_lines
@@ -223,7 +225,7 @@ class Referential < ActiveRecord::Base
scope = workbench ? workbench.lines : associated_lines
scope.where(id: metadatas.pluck(:line_ids).flatten)
else
- Chouete::Line.none
+ Chouette::Line.none
end
end