added tags controller functional test

This commit is contained in:
albert
2011-01-31 02:23:35 -05:00
parent 9837735c93
commit 28b42e791c
6 changed files with 77 additions and 4 deletions

View File

@@ -1,13 +1,26 @@
class TagsController < ApplicationController
before_filter :member_only, :only => [:edit, :update]
respond_to :html, :xml, :json
def edit
@tag = Tag.find(params[:id])
respond_with(@tag)
end
def index
@search = Tag.search(params[:search])
@tags = @search.paginate(:page => params[:page])
respond_with(@tags)
end
def show
@tag = Tag.find(params[:id])
respond_with(@tag)
end
def update
@tag = Tag.find(params[:id])
@tag.update_attributes(params[:tag])
respond_with(@tag)
end
end