Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reset votes when a news goes back to redaction

  • Loading branch information...
commit ba0fc41d97c35274b1945ee28ff76f916a0fe4ce 1 parent cf944b8
@nono nono authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  app/models/news.rb
View
2  app/models/news.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.