implement snippets lifetime
This commit is contained in:
parent
117d1e90fd
commit
8e1e17763f
5 changed files with 50 additions and 29 deletions
|
@ -33,6 +33,10 @@ class Snippet < ActiveRecord::Base
|
|||
def colorize
|
||||
system_colorize(content, file_name)
|
||||
end
|
||||
|
||||
def expired?
|
||||
expires_at && expires_at < Time.current
|
||||
end
|
||||
end
|
||||
# == Schema Information
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue