expose voting to non-gold supervoters

This commit is contained in:
r888888888
2016-03-14 16:52:49 -07:00
parent 51e77dbb9c
commit 6d6d00b190
6 changed files with 33 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
CurrentUser.user = User.admins.first
CurrentUser.ip_addr = "127.0.0.1"
PostVote.find_each do |vote|
vote.destroy unless User.find(vote.user_id).is_gold?
end