From 3b6228dc27fad65250884256bec05a66e1dff74c Mon Sep 17 00:00:00 2001 From: Andrew8xx8 Date: Mon, 25 Mar 2013 00:37:14 +0400 Subject: [PATCH] It's better to use STI instead --- app/models/snippet.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 1d454801315..5d09c6b6e47 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -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