dm-is-voteable 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('dm-is-voteable', '0.0.2') do |p|
5
+ Echoe.new('dm-is-voteable', '0.0.3') do |p|
6
6
  p.description = "Makes a model voteable"
7
7
  p.url = "http://github.com/brianp/dm-is-voteable"
8
8
  p.author = "Brian Pearce"
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{dm-is-voteable}
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Brian Pearce"]
@@ -16,7 +16,7 @@ class Vote
16
16
  validates_with_method :no_vote_in_3_days
17
17
 
18
18
  def no_vote_in_3_days
19
- Vote.count(:voter => voter, :created_on.gt => 4.days.ago) == 0
19
+ Vote.count(:voter => voter, :created_on.gt => 3.days.ago) == 0
20
20
  end
21
21
 
22
22
  # belongs_to :voteable, :voteable_id
@@ -26,7 +26,7 @@ module DataMapper
26
26
  # end
27
27
 
28
28
  def tally_votes(options = {})
29
- count = Vote.count(:conditions => ["voteable_id = ?", self.id])
29
+ count = Vote.count(:voteable_id => self.id)
30
30
  end
31
31
  end
32
32
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Pearce