Skip to content
Snippets Groups Projects
Commit 3b6228dc authored by Andrew8xx8's avatar Andrew8xx8
Browse files

It's better to use STI instead

parent 83eb63cb
No related branches found
No related tags found
1 merge request!3351Personal snipepts support added
Loading
Loading
@@ -34,7 +34,6 @@ class Snippet < ActiveRecord::Base
scope :private, -> { where(private: true) }
scope :fresh, -> { order("created_at DESC") }
scope :expired, -> { where(["expires_at IS NOT NULL AND expires_at < ?", Time.current]) }
scope :has_project, -> { where("bars.id IS NOT NULL") }
scope :non_expired, -> { where(["expires_at IS NULL OR expires_at > ?", Time.current]) }
 
def self.content_types
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment