acts_as_votable 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/acts_as_votable/version.rb +1 -1
- data/lib/acts_as_votable/voter.rb +2 -0
- metadata +2 -2
@@ -22,12 +22,14 @@ module ActsAsVotable
|
|
22
22
|
votes = find_votes(:votable_id => votable.id, :votable_type => votable.class.name)
|
23
23
|
votes.size > 0
|
24
24
|
end
|
25
|
+
alias :voted_for? :voted_on?
|
25
26
|
|
26
27
|
def voted_as_when_voting_on votable
|
27
28
|
votes = find_votes(:votable_id => votable.id, :votable_type => votable.class.name)
|
28
29
|
return nil if votes.size == 0
|
29
30
|
return votes.first.vote_flag
|
30
31
|
end
|
32
|
+
alias :voted_as_when_voting_for :voted_as_when_voting_on
|
31
33
|
|
32
34
|
def find_votes extra_conditions = {}
|
33
35
|
ActsAsVotable::Vote.find(:all, :conditions => default_conditions.merge(extra_conditions))
|