Sha256: 83475df8bf40bad5f65feef1b3ce44c895d49a37b942193cad97a52514b85f82

Contents?: true

Size: 553 Bytes

Versions: 10

Compression:

Stored size: 553 Bytes

Contents

class WikiPage
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Versioning

  field :title, type: String
  field :transient_property, type: String, versioned: false
  field :author, type: String
  field :description, type: String, localize: true
  max_versions 5

  attr_protected :author

  has_many :comments, dependent: :destroy, validate: false
  has_many :child_pages, class_name: "WikiPage", dependent: :delete, inverse_of: :parent_pages
  belongs_to :parent_pages, class_name: "WikiPage", inverse_of: :child_pages
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
mongoid-3.1.7 spec/app/models/wiki_page.rb
mongoid-3.1.6 spec/app/models/wiki_page.rb
mongoid-3.1.5 spec/app/models/wiki_page.rb
mongoid-paranoia-0.3.0 spec/app/models/wiki_page.rb
mongoid-paranoia-0.2.1 spec/app/models/wiki_page.rb
mongoid-versioning-0.2.0 spec/app/models/wiki_page.rb
mongoid-paranoia-0.2.0 spec/app/models/wiki_page.rb
mongoid-paranoia-0.1.1 spec/app/models/wiki_page.rb
mongoid-versioning-0.1.0 spec/app/models/wiki_page.rb
mongoid-paranoia-0.1.0 spec/app/models/wiki_page.rb