diff options
| author | cedricnjanga | 2017-10-02 17:34:49 +0200 | 
|---|---|---|
| committer | cedricnjanga | 2017-10-02 17:36:41 +0200 | 
| commit | cba31dc411ceb47f80202c1d3a32a2e031630b13 (patch) | |
| tree | 429718a617260f5013bb9d07b828e3d1bd26c738 /app/models/compliance_control_set.rb | |
| parent | 466dde61ed0cdf32c06cb3738e32f38c50c4558e (diff) | |
| download | chouette-core-cba31dc411ceb47f80202c1d3a32a2e031630b13.tar.bz2 | |
Refs #4665
Add a controller concern to deal with date filters
Diffstat (limited to 'app/models/compliance_control_set.rb')
| -rw-r--r-- | app/models/compliance_control_set.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/app/models/compliance_control_set.rb b/app/models/compliance_control_set.rb index 40e269146..1ab0fd6d2 100644 --- a/app/models/compliance_control_set.rb +++ b/app/models/compliance_control_set.rb @@ -4,7 +4,7 @@ class ComplianceControlSet < ActiveRecord::Base    has_many :compliance_controls, dependent: :destroy    validates :name, presence: true -  scope :where_updated_at_between, ->(start_date, end_date) do -    where('updated_at BETWEEN ? AND ?', start_date, end_date) +  scope :where_updated_at_between, ->(period_range) do +    where('updated_at BETWEEN :begin AND :end', begin: period_range.begin, end: period_range.end)    end  end | 
