moved some donmai-specific stuff out of default config

This commit is contained in:
albert
2010-11-19 13:44:11 -05:00
parent 190beedb7a
commit a156cc8c62
11 changed files with 89 additions and 43 deletions

View File

@@ -1,19 +1,36 @@
class BansController < ApplicationController
def new
@ban = Ban.new
end
def edit
@ban = Ban.find(params[:id])
end
def index
@search = Ban.search(params[:search])
@bans = @search.paginate(:page => params[:page])
end
def show
@ban = Ban.find(params[:id])
end
def create
@ban = Ban.new(params[:ban])
if @ban.save
redirect_to ban_path(@ban)
else
render :action => "new"
end
end
def update
@ban = Ban.find(params[:id])
if @ban.update_attributes(params[:ban])
redirect_to ban_path(@ban)
else
render :action => "edit"
end
end
end