Forum: Ruby on Rails Ajax Search

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
18234c3c6b04ac08d8afb1eeb2e20269?d=identicon&s=25 Avi (Guest)
on 2013-07-19 07:47
(Received via mailing list)
Hello All,

I am using Kaminari gem for pagination.
I want to do a ajax search on the same page of the data in the table
is a list of images with names.

Can anyone suggest anything ?

6a850886d1527d7eb9470f1e40577efc?d=identicon&s=25 Rajesh Madanapalli (rajeshreddy)
on 2013-07-19 10:50
(Received via mailing list)
Hi Avinash,

Instead of Kaminari gem try Jquery datatables it gives u default
pagination, search, and sort features you can customize it according to
your needs

18234c3c6b04ac08d8afb1eeb2e20269?d=identicon&s=25 avinash behera (Guest)
on 2013-07-19 10:54
(Received via mailing list)
I have tried with that.
There are more than 3000 records. So datatable is taking time to load
time page refreshes unlike kaminari.

On Fri, Jul 19, 2013 at 2:18 PM, Rajesh reddy <>

>> Avi
> For more options, visit

Af6c01b87003c2bf4c0b81658199c0a4?d=identicon&s=25 Thiago Cifani (Guest)
on 2013-07-19 15:12
(Received via mailing list)
Hey man,

What's up? I read you email, and a fast way to solve this problem is
putting a remote true in your search form, you can easily render a
partial, maybe called _products.html.erb on callback view, something as

So, your action will be the same but will respond to js and html.

You should do some jquery to setup a flash message if any product was
found, and another one to re-render your partial.

$(selector).html("<%= j render 'product' %>")

I did not test it, so maybe there are done typo or syntax errors here. I
am in the bus, any other doubt, please let me know.

Hope it will help you

Nice day

Enviado via iPhone

Em 19/07/2013, s 05:52, avinash behera <>
This topic is locked and can not be replied to.