Sha256: efcc312318ebcbefec25fc88d0559a2e2d03769647a1303610df41ec58769149

Contents?: true

Size: 254 Bytes

Versions: 4

Compression:

Stored size: 254 Bytes

Contents

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

class Comment
  include MongoMapper::Document
  include Mongo::Voteable

  key :content, String

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
voteable_mongo-0.9.3 spec/mongo_mapper/models/comment.rb
voteable_mongo-0.9.2 spec/mongo_mapper/models/comment.rb
voteable_mongo-0.9.1 spec/mongo_mapper/models/comment.rb
voteable_mongo-0.9.0 spec/mongo_mapper/models/comment.rb