Sha256: d463cbb30e46ecb470b10b919dc0c6a4543fc11f83c1cfad79312be1b048d8b5

Contents?: true

Size: 281 Bytes

Versions: 8

Compression:

Stored size: 281 Bytes

Contents

class Mongoid::Post
  include Mongoid::Document

  has_many :comments, :class_name => "Mongoid::Comment"
  belongs_to :category, :class_name => "Mongoid::Category"

  embeds_many :users, :class_name => "Mongoid::User"

  scope :preload_comments, lambda { includes(:comments) }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bullet-4.6.0 spec/models/mongoid/post.rb
bullet-4.5.0 spec/models/mongoid/post.rb
bullet-4.4.0 spec/models/mongoid/post.rb
bullet-4.3.1 spec/models/mongoid/post.rb
bullet-4.3.0 spec/models/mongoid/post.rb
bullet-4.2.0 spec/models/mongoid/post.rb
bullet-4.1.6 spec/models/mongoid/post.rb
bullet-4.1.5 spec/models/mongoid/post.rb