nagybence-vote_fu 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.markdown +1 -1
  2. data/lib/acts_as_voter.rb +4 -4
  3. metadata +4 -2
@@ -29,7 +29,7 @@ Run the following command:
29
29
 
30
30
  Create a new rails migration using the generator:
31
31
 
32
- ./script/generate voteable VoteableModel
32
+ ./script/generate vote_fu VoteableModel
33
33
 
34
34
  Usage
35
35
  =====
@@ -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,16 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagybence-vote_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Jackson
8
8
  - Cosmin Radoi
9
+ - Bence Nagy
10
+ - Rob Maddox
9
11
  autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
12
14
 
13
- date: 2008-12-02 00:00:00 -08:00
15
+ date: 2009-01-07 00:00:00 -08:00
14
16
  default_executable:
15
17
  dependencies: []
16
18