class FilterCriteria < ActiveRecord::Base
  has_many :filter_criteria_values
  belongs_to :owner, polymorphic: true
  validates_presence_of :title
  self.inheritance_column = :_type_disabled
  def owner_type=(class_name)
    super(class_name.constantize.base_class.to_s)
  end

   def type_enum
    # Do not select any value, or add any blank field. RailsAdmin will do it for you.
    [['Multi select', 1], ['Single select', 2]]
  end
end
