summaryrefslogtreecommitdiff
path: root/app/models/snippet.rb
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-06-04 08:37:19 +0200
committerMarin Jankovski <marin@gitlab.com>2014-06-04 08:37:19 +0200
commit18b1f171bd0b9700e73c37c23150bea9fb251b3e (patch)
tree5c461f95d6b5b50b75edb4946ea8b980318e7dfe /app/models/snippet.rb
parent84dc9cd6926ea8bc4db533e658463b4e60f68e6b (diff)
downloadgitlab-ce-18b1f171bd0b9700e73c37c23150bea9fb251b3e.tar.gz
Rename snippets scopes to plural names.
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r--app/models/snippet.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index 0727bb16398..9e4409daa1a 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -34,8 +34,8 @@ class Snippet < ActiveRecord::Base
validates :content, presence: true
# Scopes
- scope :is_public, -> { where(private: false) }
- scope :is_private, -> { where(private: true) }
+ scope :are_public, -> { where(private: false) }
+ scope :are_private, -> { where(private: true) }
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]) }