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.
- data/README.markdown +1 -1
- data/lib/acts_as_voter.rb +4 -4
- metadata +4 -2
data/README.markdown
CHANGED
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 =
|
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 =
|
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.
|
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:
|
15
|
+
date: 2009-01-07 00:00:00 -08:00
|
14
16
|
default_executable:
|
15
17
|
dependencies: []
|
16
18
|
|