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

  acts_as_list column: :rank, scope: :category

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