Sha256: ec77ef8e1ff2bd98dfd82196691d476e7d91a46def05a49067b1becaec59c725

Contents?: true

Size: 506 Bytes

Versions: 6

Compression:

Stored size: 506 Bytes

Contents

module Mongoid
  module Voteable
    
    class Votes
      include Mongoid::Document

      field :up, :type => Array, :default => []
      field :down, :type => Array, :default => []
      field :up_count, :type => Integer, :default => 0
      field :down_count, :type => Integer, :default => 0
      field :count, :type => Integer, :default => 0
      field :point, :type => Integer, :default => 0

      DEFAULT_ATTRIBUTES = new.attributes
      DEFAULT_ATTRIBUTES.delete('_id')
    end
    
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voteable_mongoid-0.7.6 lib/voteable_mongoid/voteable/votes.rb
voteable_mongoid-0.7.5 lib/voteable_mongoid/voteable/votes.rb
voteable_mongoid-0.7.4 lib/voteable_mongoid/voteable/votes.rb
voteable_mongoid-0.7.3 lib/voteable_mongoid/voteable/votes.rb
voteable_mongoid-0.7.2 lib/voteable_mongoid/voteable/votes.rb
voteable_mongoid-0.7.1 lib/voteable_mongoid/voteable/votes.rb