expose voting to non-gold supervoters
This commit is contained in:
12
script/fixes/040_fix_post_scores.rb
Normal file
12
script/fixes/040_fix_post_scores.rb
Normal 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
|
||||
Reference in New Issue
Block a user