Sha256: aed0f15adc23a44bd256baf8ec69340d5e22cfff0dc21ca6a01a234910718473

Contents?: true

Size: 283 Bytes

Versions: 4

Compression:

Stored size: 283 Bytes

Contents

class Mongoid::Post
  include Mongoid::Document

  field :name

  has_many :comments, class_name: 'Mongoid::Comment'
  belongs_to :category, class_name: 'Mongoid::Category'

  embeds_many :users, class_name: 'Mongoid::User'

  scope :preload_comments, -> { includes(:comments) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bullet-5.7.4 spec/models/mongoid/post.rb
bullet-5.7.3 spec/models/mongoid/post.rb
bullet-5.7.2 spec/models/mongoid/post.rb
bullet-5.7.1 spec/models/mongoid/post.rb