diff options
| author | Guillaume | 2017-09-25 18:19:21 +0200 |
|---|---|---|
| committer | Guillaume | 2017-09-25 18:19:21 +0200 |
| commit | 82f611cd417d7e3a98f4fa7d21e2f94e6bc9a011 (patch) | |
| tree | 9383afa60f3430930cc0ac1ba669d0b52af7f548 /app/models/compliance_check_set.rb | |
| parent | 2fa5b41379f33b399121dca1149dd7b20cf6d00d (diff) | |
| download | chouette-core-82f611cd417d7e3a98f4fa7d21e2f94e6bc9a011.tar.bz2 | |
add compliance_check_sets structure Refs #3564
Diffstat (limited to 'app/models/compliance_check_set.rb')
| -rw-r--r-- | app/models/compliance_check_set.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/compliance_check_set.rb b/app/models/compliance_check_set.rb index 7b6400a21..3c62221f0 100644 --- a/app/models/compliance_check_set.rb +++ b/app/models/compliance_check_set.rb @@ -7,4 +7,9 @@ class ComplianceCheckSet < ActiveRecord::Base belongs_to :parent, polymorphic: true enumerize :status, in: %w[new pending successful warning failed running aborted canceled] + + scope :where_created_at_between, ->(start_date, end_date) do + where('created_at BETWEEN ? AND ?', start_date, end_date) + end + end |
