diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-01-10 14:19:04 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-01-10 14:19:04 -0600 |
commit | 13b4d7953adfa8455f800a56124c7d6ecafa41ca (patch) | |
tree | 76fa5d86a2e646c09b08637625cc31aaa2f694b0 /app/models/custom_filter.rb | |
parent | e13202c114eeb7584e776a073a41d9e57ae31e02 (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.rb | 3 |
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 |