additional functional tests, some controller fixes

This commit is contained in:
albert
2010-12-01 18:50:04 -05:00
parent 39dd2e277a
commit 976a25a6c6
19 changed files with 185 additions and 27 deletions

View File

@@ -20,6 +20,8 @@ class BansController < ApplicationController
def create
@ban = Ban.new(params[:ban])
@ban.banner_id = CurrentUser.id
if @ban.save
redirect_to ban_path(@ban), :notice => "Ban created"
else
@@ -39,5 +41,6 @@ class BansController < ApplicationController
def destroy
@ban = Ban.find(params[:id])
@ban.destroy
redirect_to bans_path, :notice => "Ban destroyed"
end
end