don't count expired snippets
This commit is contained in:
parent
000c032482
commit
325b84545c
2 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ class Snippet < ActiveRecord::Base
|
|||
:length => { :within => 0..10000 }
|
||||
|
||||
scope :fresh, order("created_at DESC")
|
||||
scope :non_expired, where(["expires_at IS NULL OR expires_at > ?", Time.current])
|
||||
|
||||
def self.content_types
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue