Sha256: 893062ab16b73a41ac0ee524ac68c3a91fc58dbae4af5834c7c103fc0462a0fa

Contents?: true

Size: 244 Bytes

Versions: 10

Compression:

Stored size: 244 Bytes

Contents

require File.join(File.dirname(__FILE__), 'post')

class Comment
  include Mongoid::Document
  include Mongo::Voteable

  field :content

  belongs_to :post
  
  voteable self, :up => +1, :down => -3
  voteable Post, :up => +2, :down => -1
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
rs_voteable_mongo-1.3.0 spec/mongoid/models/comment.rb
rs_voteable_mongo-1.2.0 spec/mongoid/models/comment.rb
rs_voteable_mongo-1.1.0 spec/mongoid/models/comment.rb
rs_voteable_mongo-1.0.2 spec/mongoid/models/comment.rb
rs_voteable_mongo-1.0.1 spec/mongoid/models/comment.rb
rs_voteable_mongo-1.0.0 spec/mongoid/models/comment.rb
voteable_mongo-0.9.3 spec/mongoid/models/comment.rb
voteable_mongo-0.9.2 spec/mongoid/models/comment.rb
voteable_mongo-0.9.1 spec/mongoid/models/comment.rb
voteable_mongo-0.9.0 spec/mongoid/models/comment.rb