Sha256: aa0f78eb78fe08998014df2cdb00e58074e460f2d73308cbadecb53c923020b2

Contents?: true

Size: 294 Bytes

Versions: 3

Compression:

Stored size: 294 Bytes

Contents

class Post
  include Mongoid::Document
  include Mongoid::Voteable

  field :title
  field :content
  
  has_and_belongs_to_many :categories
  has_many :comments

  voteable self, :up => +1, :down => -1, :index => true
  voteable Category, :up => +3, :down => -5, :update_counters => false
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
voteable_mongoid-0.7.6 spec/models/post.rb
voteable_mongoid-0.7.5 spec/models/post.rb
voteable_mongoid-0.7.4 spec/models/post.rb