add tag impl functional test

This commit is contained in:
albert
2011-01-29 04:29:58 -05:00
parent d6f7ccd7ef
commit ee9aca973f
6 changed files with 91 additions and 3 deletions

View File

@@ -1,19 +1,37 @@
class TagImplicationsController < ApplicationController
before_filter :admin_only, :only => [:new, :edit, :create, :update, :destroy]
respond_to :html, :xml, :json
def new
@tag_implication = TagImplication.new
respond_with(@tag_implication)
end
def edit
@tag_implication = TagImplication.find(params[:id])
respond_with(@tag_implication)
end
def index
@search = TagImplication.search(params[:search])
@tag_implicationes = @search.paginate(:page => params[:page])
respond_with(@tag_implicationes)
end
def create
@tag_implication = TagImplication.create(params[:tag_implication])
respond_with(@tag_implication)
end
def update
@tag_implication = TagImplication.find(params[:id])
@tag_implication.update_attributes(params[:tag_implication])
respond_with(@tag_implication)
end
def destroy
@tag_implication = TagImplication.find(params[:id])
@tag_implication.destroy
respond_with(@tag_implication)
end
end