Skip to content

Commit

Permalink
Oops, it's Date, not Day
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed May 12, 2011
1 parent b44a286 commit 654789f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def vote_on_candidate(value, account)
$redis.srem("news/#{self.id}/contre", who)
else
$redis.incr("users/#{who}/nb_votes")
key = "users/#{who}/nb_votes/#{Day.today.yday}"
key = "users/#{who}/nb_votes/#{Date.today.yday}"
$redis.incr(key)
$redis.expire(key, 2678400) # 31 days
end
Expand Down

0 comments on commit 654789f

Please sign in to comment.