I added pagination to model and now finding my filtering no longer
works. By that I mean I have a table that lists product names and the
category of each product. Clicking on the category ("books") then
shows a table listing only the products in the book category. Once I
added pagination, now my filtered table shows both books and music.
Here is how I have it set up:
My product model:
_____________________________________________________
class Product < ActiveRecord::Base
  has_many :salesranks
  belongs_to  :category
    
def self.tablelisting(order, category)
    (category.nil?) ? cat = "" : cat = " and category_id=" +
category
    find(:all, :conditions => "active = 1" + cat, 
         :include => [ :salesranks, :category ],
         :order => order)
   end  
  end
_______________________________________________________
my product controller
class ProductController < ApplicationController
  model :product
  paginate :products,  :per_page => 10
def listings
    @lists = Product.tablelisting(@params[''view''],
@params[''id''])
    @allcats = Category.find(:all)
  end
______________________________________________________
If I remove the paginator, then it filters fine.
Is their some trick with using the paginatorhelper with eagerly
associated models? Or am I missing something simpler?
Thanks,
steve