We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8ac600 commit b2e5db9Copy full SHA for b2e5db9
app/models/resource_item.rb
@@ -15,6 +15,7 @@ class ResourceItem < ActiveRecord::Base
15
scope :sorted, ->{ order name: :asc}
16
scope :humans, ->{ where type: 'Human' }
17
scope :assets, ->{ where type: 'Asset' }
18
+ scope :filter_by_date, -> { where("start_date < ? AND ? < end_date", Date.today, Date.today) }
19
20
scope :like, ->(q){
21
if q.present?
0 commit comments