fix for site banner

This commit is contained in:
Kyle Drake 2015-07-01 16:09:03 -07:00
parent 6116e90e62
commit 4bfaa32431
4 changed files with 36 additions and 1 deletions

View file

@ -62,7 +62,7 @@ post '/admin/banip' do
flash[:error] = 'IP is blank, cannot continue'
redirect '/admin'
end
sites = Site.filter(ip: Site.hash_ip(site.ip), is_banned: false).all
sites = Site.filter(ip: site.ip, is_banned: false).all
sites.each {|s| s.ban!}
flash[:error] = "#{sites.length} sites have been banned."
redirect '/admin'