diff options
author | Marin Jankovski <marin@gitlab.com> | 2014-05-30 17:21:14 +0200 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2014-06-03 11:37:23 +0200 |
commit | 90c2e0d971b5c105224196b8509012f943c9ea9b (patch) | |
tree | 2d2d20f1161c6ba94b5d46aa0e0e658cfd333611 /app/models/snippet.rb | |
parent | 51d5e4cd6e109d2e0972f36b5f73d2af9966f827 (diff) | |
download | gitlab-ce-90c2e0d971b5c105224196b8509012f943c9ea9b.tar.gz |
Replace now forbidden keywords public and private for snippets scope
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 720accd73dc..0727bb16398 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 :public, -> { where(private: false) } - scope :private, -> { where(private: true) } + scope :is_public, -> { where(private: false) } + scope :is_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]) } |