Module: VoterLove::Votable

Extended by:
ActiveSupport::Concern
Defined in:
lib/voter_love/votable.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#scoreObject

Returns the difference of down and up votes.



16
17
18
# File 'lib/voter_love/votable.rb', line 16

def score
  self.up_votes - self.down_votes
end