diff options
| author | Zog | 2018-03-09 16:04:31 +0100 |
|---|---|---|
| committer | Zog | 2018-03-09 16:04:31 +0100 |
| commit | fafeb75c2aaa7f462047ad3d27a6c19ba6abcad5 (patch) | |
| tree | 3fcdb6d01674fcdaf22ef5f10fde02c642b0a214 /app/models | |
| parent | 523d3e418539cfe6af98bdcbae82d1f7d3fdd3c0 (diff) | |
| download | chouette-core-fafeb75c2aaa7f462047ad3d27a6c19ba6abcad5.tar.bz2 | |
Refs #6042; Add detailed view for purchazse windows6042-detailed_purchase_windows
Diffstat (limited to 'app/models')
| -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 |
