-1

I am new to rails, most of my experience is with desktop (Windows) GUI.

In Windows it is possible to bind s a listview to a database table. the GUI component hold a only the visible rows of the large table.

if the user scroll up/down to rows not in view, the control do a "behind the scenes" query in database to get the new rows to be displayed.

That allows the GUI to map arbitrary large tables with constance memory usage.

I am sure there must be a similar technique for rails, most likely with the aid of JQuery but I failed to find it.

I assume the terminology is different is the web world

jmromer
  • 2,212
  • 1
  • 12
  • 24
Eli
  • 6,353
  • 9
  • 30
  • 25

2 Answers2

1

I would recommend a combination of the will_paginate gem, AJAX, and some javascript framework (jQuery, prototype, AngularJS, etc.). You can use will_paginate to render the first page, and then as the user scrolls down, monitor the scroll progress and load more records. Here's a link to get you started.

Community
  • 1
  • 1
kddeisz
  • 5,162
  • 3
  • 21
  • 44
0

I ended up using select2 which did exactly what I was going for

Eli
  • 6,353
  • 9
  • 30
  • 25