Sha256: 9a8577414a36079852aecddf22ff79006e5397c0763737cdd76a15bfb3dd7e34

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

class CategoryType
  include Mongoid::Document
  include Mongoid::Localized::Accessor

  default_scope exists(:status => 1).asc(:id)

  field :_id, type: Integer
  field :name, type: Hash, localize: true
  field :level, type: Integer
  field :status, type: String
  field :site, type: Array

  embeds_many :spec_recs
  belongs_to :category_type
  has_many :category_types
  has_and_belongs_to_many :parents, class_name: 'CategoryType', inverse_of: :parents, foreign_key: 'parents'
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
models-0.0.22.1 app/models/category_type.rb