2 changed files with 3 additions and 1 deletions
@ -1,3 +1,5 @@ |
|||||||
class Notification < ApplicationRecord |
class Notification < ApplicationRecord |
||||||
acts_as_readable |
acts_as_readable |
||||||
|
|
||||||
|
scope :active, -> { where("start_date <= ?", Time.zone.now).where("end_date >= ?", Time.zone.now) } |
||||||
end |
end |
||||||
|
|||||||
Loading…
Reference in new issue