Sha256: 7f06c62f0964e1183159aa2f171b01593bb514aacd2e066d7c64a4eb50925e8c

Contents?: true

Size: 306 Bytes

Versions: 6

Compression:

Stored size: 306 Bytes

Contents

module Mongoid::Rating
  class Rate
    include Mongoid::Document
    include Mongoid::Timestamps::Short
    
    embedded_in :rateable, polymorphic: true
    belongs_to :rater, polymorphic: true, inverse_of: nil

    # rate can be integer or float so we don't force class here
    field :value
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mongoid_rating-0.1.4 lib/mongoid_rating/rate.rb
mongoid_rating-0.1.3 lib/mongoid_rating/rate.rb
mongoid_rating-0.1.2 lib/mongoid_rating/rate.rb
mongoid_rating-0.1.1 lib/mongoid_rating/rate.rb
mongoid_rating-0.1.0 lib/mongoid_rating/rate.rb
mongoid_rating-0.0.2 lib/mongoid_rating/rate.rb