diff options
author | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-27 11:46:21 +0500 |
---|---|---|
committer | Nihad Abbasov <narkoz.2008@gmail.com> | 2011-10-27 11:46:21 +0500 |
commit | 8e1e17763f169f63dc99c7a0f109fe98c87b4064 (patch) | |
tree | 7be09d97cfecfa9b0158da2cf08675580b14f4e1 /app/models/snippet.rb | |
parent | 117d1e90fdef3aaf64901ba18a5ce5bab4c668d8 (diff) | |
download | gitlab-ce-8e1e17763f169f63dc99c7a0f109fe98c87b4064.tar.gz |
implement snippets lifetime
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 0f488a8c94a..acffc76cf0d 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -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 # |