Sha256: 845ff62b22d8b1760e9f52ab370ae0f78d0822084521686636db9d3d64ba1310

Contents?: true

Size: 406 Bytes

Versions: 4

Compression:

Stored size: 406 Bytes

Contents

require 'mongoid'

class Post
  include Mongoid::Document

  field :comment_count, :type => Integer, :default => 0
  field :comment_count_positive, :type => Integer, :default => 0
  field :comment_count_negative, :type => Integer, :default => 0
  field :like_count, :type => Integer, :default => 0
  field :custom_field_name, :type => Integer, :default => 0


  has_many :comments
  embeds_many :likes
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid_countercache-1.0.0.mongoidalpha1 spec/models/post.rb
mongoid_countercache-0.0.3 spec/models/post.rb
mongoid_countercache-0.0.2 spec/models/post.rb
mongoid_countercache-0.0.1 spec/models/post.rb