more robust validation for ip bans

This commit is contained in:
albert
2013-02-23 11:16:23 -05:00
parent e7da9b2a37
commit 4c3159b662
3 changed files with 15 additions and 6 deletions

View File

@@ -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