Sha256: 42173443fb18913e306212b224ee25b872329ac13d907e44b28c7c69d710afde

Contents?: true

Size: 314 Bytes

Versions: 22

Compression:

Stored size: 314 Bytes

Contents

# frozen_string_literal: true

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

22 entries across 22 versions & 1 rubygems

Version Path
bullet-7.0.7 spec/models/mongoid/post.rb
bullet-7.0.6 spec/models/mongoid/post.rb
bullet-7.0.5 spec/models/mongoid/post.rb
bullet-7.0.4 spec/models/mongoid/post.rb
bullet-7.0.3 spec/models/mongoid/post.rb
bullet-7.0.2 spec/models/mongoid/post.rb
bullet-7.0.1 spec/models/mongoid/post.rb
bullet-7.0.0 spec/models/mongoid/post.rb
bullet-6.1.5 spec/models/mongoid/post.rb
bullet-6.1.4 spec/models/mongoid/post.rb
bullet-6.1.3 spec/models/mongoid/post.rb
bullet-6.1.2 spec/models/mongoid/post.rb
bullet-6.1.1 spec/models/mongoid/post.rb
bullet-6.1.0 spec/models/mongoid/post.rb
bullet-6.0.2 spec/models/mongoid/post.rb
bullet-6.0.1 spec/models/mongoid/post.rb
bullet-6.0.0 spec/models/mongoid/post.rb
bullet-5.9.0 spec/models/mongoid/post.rb
bullet-5.8.1 spec/models/mongoid/post.rb
bullet-5.8.0 spec/models/mongoid/post.rb