Files
danbooru/app/controllers/ip_bans_controller.rb
2018-02-01 16:35:47 -08:00

26 lines
541 B
Ruby

class IpBansController < ApplicationController
respond_to :html, :xml, :json
before_filter :moderator_only
def new
@ip_ban = IpBan.new
end
def create
@ip_ban = IpBan.create(params[:ip_ban])
respond_with(@ip_ban, :location => ip_bans_path)
end
def index
@search = IpBan.search(params[:search])
@ip_bans = @search.paginate(params[:page], :limit => params[:limit])
respond_with(@ip_bans)
end
def destroy
@ip_ban = IpBan.find(params[:id])
@ip_ban.destroy
respond_with(@ip_ban)
end
end