Sha256: c40f9a236e58c08cd31977056d63d199adbaa8c99c3605b506dc07ea17121f8b

Contents?: true

Size: 278 Bytes

Versions: 1

Compression:

Stored size: 278 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
  voteable Category, :up => +3, :down => -5, :update_counters => false
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voteable_mongoid-0.7.3 spec/models/post.rb