2021-02-01 14:02:54 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Filter < ApplicationRecord
|
|
|
|
has_many :conditions, dependent: :destroy
|
|
|
|
has_many :operations, dependent: :destroy
|
2021-03-04 22:54:26 +01:00
|
|
|
|
|
|
|
validates :description, presence: true
|
2021-02-01 14:02:54 +01:00
|
|
|
|
|
|
|
scope :enabled, -> { where(enabled: true) }
|
|
|
|
end
|