moved out search pages

This commit is contained in:
albert
2011-03-15 19:19:49 -04:00
parent 7c45243d16
commit 42627be1d3
19 changed files with 77 additions and 93 deletions

View File

@@ -13,10 +13,15 @@ class ArtistsController < ApplicationController
end
def index
@artists = Artist.build_relation(params).paginate(:per_page => 25, :page => params[:page])
@search = Artist.search(params[:search])
@artists = @search.paginate(:page => params[:page])
respond_with(@artists)
end
def search
@search = Artist.search(params[:search])
end
def show
@artist = Artist.find(params[:id])

View File

@@ -13,6 +13,10 @@ class TagsController < ApplicationController
respond_with(@tags)
end
def search
@search = Tag.search(params[:search])
end
def show
@tag = Tag.find(params[:id])
respond_with(@tag)