Snippet restyle
This commit is contained in:
parent
ca4e2ad135
commit
0712e78597
4 changed files with 67 additions and 57 deletions
|
@ -28,6 +28,7 @@ class Snippet < ActiveRecord::Base
|
|||
|
||||
scope :fresh, order("created_at DESC")
|
||||
scope :non_expired, where(["expires_at IS NULL OR expires_at > ?", Time.current])
|
||||
scope :expired, where(["expires_at IS NOT NULL AND expires_at < ?", Time.current])
|
||||
|
||||
def self.content_types
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue