Module: TealeafVoteable::InstanceMethods
- Defined in:
- lib/ycchen-gem-voteable.rb
Instance Method Summary collapse
Instance Method Details
#minus_vote_count ⇒ Object
15 16 17 |
# File 'lib/ycchen-gem-voteable.rb', line 15 def minus_vote_count self.votes.where(vote: false).count end |
#plus_vote_count ⇒ Object
11 12 13 |
# File 'lib/ycchen-gem-voteable.rb', line 11 def plus_vote_count self.votes.where(vote: true).count end |