Permalink
Browse files

Reset votes when a news goes back to redaction

  • Loading branch information...
nono committed Jun 7, 2012
1 parent cf944b8 commit ba0fc41d97c35274b1945ee28ff76f916a0fe4ce
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/models/news.rb
View
@@ -116,6 +116,8 @@ def be_refused
end
def be_rewritten
+ %w(pour contre).each {|word| $redis.del("news/#{self.id}/#{word}") }
+ node.update_column(:score, 0)
Push.create(self, :kind => :rewritten, :username => moderator.name)
end

0 comments on commit ba0fc41

Please sign in to comment.