class Tag < ApplicationRecord
  belongs_to :school

  has_many :attached_tags, dependent: :destroy

  validates :name, :color, presence: true

  scope :ordered, -> { order(:name) }
  scope :by_ids, ->(ids) { where(id: ids) if ids.present? }
end
