Module: Voteable::InstanceMethods
- Defined in:
- lib/voteable.rb
Instance Method Summary collapse
Instance Method Details
#my_instance_method ⇒ Object
16 17 18 |
# File 'lib/voteable.rb', line 16 def my_instance_method puts "module instance method" end |
#total_votes ⇒ Object
13 14 15 |
# File 'lib/voteable.rb', line 13 def total_votes self.votes.where(vote: true).size - self.votes.where(vote: false).size end |