And again, managed... Amaizing thing, this rails.

On Sep 26, 8:00 pm, isaac <[email protected]> wrote:
> I have somthing like 11,000 products in my app
> 1. how can I make the index page to include only some of them (lets
> say only:
> @products = Product.find_all_by_category_id(params
> [:category_id], :order => "name")
> )
>
> 2. is there any way to paginate partials?
> I have:
>    def update_table_category
>     �...@products = Product.find_all_by_category_id(params
> [:category_id], :order => "name").paginate(:page => params
> [:page], :per_page => 30)
>     �...@subcategories = Subcategory.find(:all, :conditions =>
> { :category_id => params[:category_id] }, :order => "name")
>      render :partial => "products/table_plus", :object => @products
>    end
>
> and it paginates nicely, but when I click on any page other than 1 -
> it tries to take me to products/update_table_category/?page=..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to