redmine_glossary/app/models/glossary_category.rb
2020-01-02 19:39:21 +09:00

10 lines
215 B
Ruby

class GlossaryCategory < ActiveRecord::Base
has_many :terms, class_name: 'GlossaryTerm', foreign_key: 'category_id'
belongs_to :project
acts_as_positioned
scope :sorted, lambda { order(:position) }
end