Module: Voteable::InstanceMethods
- Defined in:
- lib/voteable/voteable.rb
Instance Method Summary collapse
Instance Method Details
#total_votes ⇒ Object
9 10 11 |
# File 'lib/voteable/voteable.rb', line 9 def total_votes self.votes.where(votes: true).size - self.votes.where(votes: false).size end |