Sha256: dfcaff661fcccafb499450677ca0a01133da6117fc075e7aa3b37ba95ee6d8cd

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

class Vote < ActiveRecord::Base
  belongs_to :voteable, :polymorphic=>true
  validates_uniqueness_of :voteable_type, :scope=> SocialEngine::Helpers::Fingerprint.fingerprint_type(:voteable_id), 
                          :if => Proc.new { |x| SocialEngineYetting.fingerprint_method != "none" }
  
  def up?
    self.value>0
  end
  
  def down?
    self.value<0
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_engine-0.0.1 app/models/vote.rb