diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-03-05 17:17:49 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-03-05 18:12:17 -0500 |
commit | 836d5930332797192094ce4a3c8083e96f7e8c53 (patch) | |
tree | c747507b44acc831105773a6560bd6e3694a93bb /app/models/snippet.rb | |
parent | 28bee175dbdba8bb0ca04887d6f8d5c4d727a0bd (diff) | |
download | gitlab-ce-836d5930332797192094ce4a3c8083e96f7e8c53.tar.gz |
Remove `Snippet#expires_at`rs-snippets-dont-expire
This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index f876be7a4c8..dd3925c7a7d 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -10,7 +10,6 @@ # created_at :datetime # updated_at :datetime # file_name :string(255) -# expires_at :datetime # type :string(255) # visibility_level :integer default(0), not null # @@ -46,8 +45,6 @@ class Snippet < ActiveRecord::Base scope :are_public, -> { where(visibility_level: Snippet::PUBLIC) } scope :public_and_internal, -> { where(visibility_level: [Snippet::PUBLIC, Snippet::INTERNAL]) } scope :fresh, -> { order("created_at DESC") } - scope :expired, -> { where(["expires_at IS NOT NULL AND expires_at < ?", Time.current]) } - scope :non_expired, -> { where(["expires_at IS NULL OR expires_at > ?", Time.current]) } participant :author, :notes @@ -111,10 +108,6 @@ class Snippet < ActiveRecord::Base nil end - def expired? - expires_at && expires_at < Time.current - end - def visibility_level_field visibility_level end |