Sha256: bddd0f033022208b5adfd3801a892d91dbb69539ea41915b72553decb48fb2b9

Contents?: true

Size: 435 Bytes

Versions: 7

Compression:

Stored size: 435 Bytes

Contents

# encoding: UTF-8
class Character::PostCategory
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Slug
  include Mongoid::Attributes::Dynamic # required to remove users using _delete field
  include Orderable

  # attributes
  field :title

  # relations
  has_many :posts, class_name: 'Character::Post'

  # slugs
  slug :title, history: true

  # indexes
  index({ slug: 1 })
  index({ _position: -1 })
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
character-1.0.6 app/models/character/post_category.rb
character-1.0.5 app/models/character/post_category.rb
character-1.0.4 app/models/character/post_category.rb
character-1.0.3 app/models/character/post_category.rb
character-1.0.2 app/models/character/post_category.rb
character-1.0.1 app/models/character/post_category.rb
character-1.0.0 app/models/character/post_category.rb