Sha256: aefb82d62dce113e56a4585fd6d60aaba86db7b3792eb332bce187186710250b

Contents?: true

Size: 292 Bytes

Versions: 1

Compression:

Stored size: 292 Bytes

Contents

class Post
  include Mongoid::Document
  include Mongo::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

1 entries across 1 versions & 1 rubygems

Version Path
voteable_mongo-0.8.1 spec/models/post.rb