2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-15 11:46:57 -04:00
|
|
|
module Searchable
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2019-03-18 03:25:45 -04:00
|
|
|
PRIORITIES = Enum.new(
|
2019-03-24 22:59:55 -04:00
|
|
|
ignore: 1,
|
|
|
|
very_low: 2,
|
|
|
|
low: 3,
|
2019-03-18 03:25:45 -04:00
|
|
|
normal: 0,
|
2019-03-24 22:59:55 -04:00
|
|
|
high: 4,
|
|
|
|
very_high: 5
|
2019-03-18 03:25:45 -04:00
|
|
|
)
|
|
|
|
|
2017-08-15 11:46:57 -04:00
|
|
|
included do
|
|
|
|
has_one "#{self.name.underscore}_search_data".to_sym, dependent: :destroy
|
|
|
|
end
|
|
|
|
end
|