joining on multiple tables

I'm having trouble trying to join on multiple tables. In this example, I want to do fetch of companies in a specified category and location. The pagination code is using the will_paginate plugin. Any pointers? Do I need to resort to a find_by_sql?

      @category = Category.find(params[:category_id])      @location = Location.find(params[:location_id])       #Need to join on location id too, how?       @companies = @category.companies.paginate :all, :per_page => 10, :page => params[:page]

Thanks, Tommy

Hi Tommy,

There is a will_paginate group: http://groups.google.com/group/will_paginate

Ask your question there, please. Thanks,

- Mislav