Topic: Paginator query refactoring

Hey guys...

I'm using Bruce Williams' awesome paginator gem to handle my pagination. But unfortunatly my controller looks very fat and bulky. Any ideas how i could streamline this piece of controller code below?

#snip
@filter = filter_options
@rows = Tag.find_by_name(params[:tag]).products.count(
  :all,
  :conditions=>["products.name LIKE ?", "%#{@filter[:q]}%"]
).to_i
@pager = ::Paginator.new(@rows, @filter[:limit]) do |offset, limit|
  Tag.find_by_name(params[:tag]).products.find(
    :all,
    :conditions=>["products.name LIKE ?", "%#{@filter[:q]}%"],
    :order=>"products.name ASC",
    :limit=>limit, :offset=>offset
  )
end
#snip

Thank wink