diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-04 11:33:25 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-04 11:33:25 +0400 |
commit | d986aea3f085daafc52f4a8d8de8618eeaf01df4 (patch) | |
tree | 1ec0409feed41f401f77e61a4acd199208808334 /app/models | |
parent | 9e924c70f3bc1d173eb89149c369ca7e502e225b (diff) | |
parent | 18b1f171bd0b9700e73c37c23150bea9fb251b3e (diff) |
Merge branch 'upgrade_to_rails_4.1' into 'master'
Upgrade to rails 4.1
Diffstat (limited to 'app/models')
-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..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 :public, -> { where(private: false) } - scope :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]) } |