maxiperez
maxiperez

Reputation: 1480

will paginate problem in rails

I am using will_paginate plugin in rails project

My problem is the next I have Product model.so In index view I list all products. This view has got filters options which obviously filter and update the page via AJAX.

NOTE 1: The filters are link_to_remote to action filters.then processes the order and then update the view.

My problem is that I paginate the product in index action and then I should paginate again in filters action. So how could replace or transform the page links to remote links to filters action.

Excuse my english syntax and thanks in advance.

NOTE 2: If you need my code then I will post.

Upvotes: 0

Views: 198

Answers (1)

Adrien Coquio
Adrien Coquio

Reputation: 4930

It depend of the way you are updating the list of products with Ajax but if your method filters render a view or partial, you might include the pagination in this partial and update it with the list of products.

Upvotes: 1

Related Questions