peteonrails-vote_fu 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/acts_as_voter.rb +4 -4
  2. metadata +1 -1
data/lib/acts_as_voter.rb CHANGED
@@ -37,15 +37,15 @@ module PeteOnRails
37
37
 
38
38
  def voted_for?(voteable)
39
39
  0 < Vote.count(:all, :conditions => [
40
- "voter_id = ? AND voter_type = ? AND vote = TRUE AND voteable_id = ? AND voteable_type = ?",
41
- self.id, self.class.name, voteable.id, voteable.class.name
40
+ "voter_id = ? AND voter_type = ? AND vote = ? AND voteable_id = ? AND voteable_type = ?",
41
+ self.id, self.class.name, true, voteable.id, voteable.class.name
42
42
  ])
43
43
  end
44
44
 
45
45
  def voted_against?(voteable)
46
46
  0 < Vote.count(:all, :conditions => [
47
- "voter_id = ? AND voter_type = ? AND vote = FALSE AND voteable_id = ? AND voteable_type = ?",
48
- self.id, self.class.name, voteable.id, voteable.class.name
47
+ "voter_id = ? AND voter_type = ? AND vote = ? AND voteable_id = ? AND voteable_type = ?",
48
+ self.id, self.class.name, false, voteable.id, voteable.class.name
49
49
  ])
50
50
  end
51
51
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peteonrails-vote_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Jackson