aboutsummaryrefslogtreecommitdiff
path: root/app/models/section.rb
blob: a9d163e316a2c39c1c3054cae1f85f00ee9f486d (plain)
1
2
3
4
5
6
7
8
9
10
class Section < ApplicationRecord
  belongs_to :category
  has_ony :taxonomy, through: :category

  acts_as_list column: :rank, scope: :category

  validates :name,
            uniqueness: { scope: category_id },
            length: 3..64
end