about summary refs log tree commit diff
path: root/app/models/custom_filter.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-10 14:19:04 -0600
commit13b4d7953adfa8455f800a56124c7d6ecafa41ca (patch)
tree76fa5d86a2e646c09b08637625cc31aaa2f694b0 /app/models/custom_filter.rb
parente13202c114eeb7584e776a073a41d9e57ae31e02 (diff)
add ability to toggle individual filters without deleting them
Diffstat (limited to 'app/models/custom_filter.rb')
-rw-r--r--app/models/custom_filter.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/custom_filter.rb b/app/models/custom_filter.rb
index e5e0d1554..f60c42121 100644
--- a/app/models/custom_filter.rb
+++ b/app/models/custom_filter.rb
@@ -9,12 +9,15 @@
 #  phrase     :text             default(""), not null
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
+#  is_enabled :boolean          default(TRUE), not null
 #
 
 class CustomFilter < ApplicationRecord
   include Expireable
   include Redisable
 
+  scope :enabled, -> { where(is_enabled: true) }
+
   belongs_to :account
 
   validates :phrase, presence: true