diff options
| author | Zog | 2018-03-29 14:38:45 +0200 | 
|---|---|---|
| committer | Zog | 2018-03-29 14:38:45 +0200 | 
| commit | ef01bea2bef74358e3df3e74cc613d664a9a554d (patch) | |
| tree | 19b375858b37645754198c048841458621d23737 /app/models/chouette/line.rb | |
| parent | 1019debe93d776f0d38ae69099e6492a7dd4a87c (diff) | |
| download | chouette-core-ef01bea2bef74358e3df3e74cc613d664a9a554d.tar.bz2 | |
Refs #4658; Remove `current_functional_scope`
Diffstat (limited to 'app/models/chouette/line.rb')
| -rw-r--r-- | app/models/chouette/line.rb | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/app/models/chouette/line.rb b/app/models/chouette/line.rb index ae7c25377..c8a02da1f 100644 --- a/app/models/chouette/line.rb +++ b/app/models/chouette/line.rb @@ -51,6 +51,14 @@ module Chouette          )      } +    scope :for_organisation, ->(organisation){ +      if objectids = organisation&.lines_scope +        where(objectid: objectids) +      else +        all +      end +    } +      def self.nullable_attributes        [:published_name, :number, :comment, :url, :color, :text_color, :stable_id]      end | 
