orbit-basic/app/models/category.rb

16 lines
353 B
Ruby

class Category
include Mongoid::Document
include Mongoid::Timestamps
include OrbitCoreLib::ObjectAuthable
field :disable, type: Boolean, default: false
field :title, localize: true
validates :title, :at_least_one => true
belongs_to :module_app
has_many :buffer_categories
scope :enabled, where(:disable.in => [false, nil, ''])
end