diff options
| author | Alban Peignier | 2018-03-14 15:45:47 +0100 | 
|---|---|---|
| committer | GitHub | 2018-03-14 15:45:47 +0100 | 
| commit | 9ba5039d6219367d45a182ca09197e3645f628e6 (patch) | |
| tree | 18f52f725322dc3f6420cf742cb7c1e6848dcdbf /app/models/chouette/purchase_window.rb | |
| parent | e67f5db85a228a930f7d33b5c495b2ee80ed93bd (diff) | |
| parent | fafeb75c2aaa7f462047ad3d27a6c19ba6abcad5 (diff) | |
| download | chouette-core-9ba5039d6219367d45a182ca09197e3645f628e6.tar.bz2 | |
Merge pull request #367 from af83/6042-detailed_purchase_windows
Add detailed view for purchase windows. Refs #6042 
Diffstat (limited to 'app/models/chouette/purchase_window.rb')
| -rw-r--r-- | app/models/chouette/purchase_window.rb | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/chouette/purchase_window.rb b/app/models/chouette/purchase_window.rb index 157390a21..4c8014780 100644 --- a/app/models/chouette/purchase_window.rb +++ b/app/models/chouette/purchase_window.rb @@ -39,6 +39,13 @@ module Chouette        self.slice(*attrs).values + ranges_attrs      end +    def bounding_dates +      [ +        date_ranges.map(&:first).min, +        date_ranges.map(&:last).max, +      ] +    end +      # def checksum_attributes      # end  | 
