more robust validation for ip bans
This commit is contained in:
@@ -7,7 +7,12 @@ class IpBansController < ApplicationController
|
||||
|
||||
def create
|
||||
@ip_ban = IpBan.create(params[:ip_ban])
|
||||
redirect_to ip_bans_path
|
||||
|
||||
if @ip_ban.errors.any?
|
||||
render :action => "new"
|
||||
else
|
||||
redirect_to ip_bans_path
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
||||
Reference in New Issue
Block a user