diff options
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 |
