voteable_dave_jul 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/voteable_dave_jul.rb +3 -3
  2. metadata +1 -1
@@ -11,15 +11,15 @@ module VoteableDaveJul
11
11
 
12
12
  # handles counting votes for comments and posts
13
13
  def total_votes
14
- up_votes - down_votes
14
+ self.up_votes - self.down_votes
15
15
  end
16
16
 
17
17
  def up_votes
18
- votes.where(vote: true).size
18
+ self.votes.where(vote: true).size
19
19
  end
20
20
 
21
21
  def down_votes
22
- votes.where(vote: false).size
22
+ self.votes.where(vote: false).size
23
23
  end
24
24
 
25
25
  # module ClassMethods
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voteable_dave_jul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: