infinite-scrolling icon indicating copy to clipboard operation
infinite-scrolling copied to clipboard

3 ways to load more records from database using Ruby on Rails

Dependency Status

Page scrolling

3 ways to load more records from database

Demo available at https://infinite-scrolling.herokuapp.com/

Infinite Scrolling

Loads new records as user scrolls down

Load more button

Loads more records on click of button at the bottom of page

Paginate

Traditional pagination at the bottom of page


Gems used

  • gem 'will_paginate'

  • gem 'bootstrap-sass'

  • gem 'bootstrap-will_paginate'

  • gem 'slim'

  • gem 'faker'

  • gem 'query_diet'

Gem removed

  • gem 'turbolinks'

NOTE: I have tried multiple ways to get Infinite Scrolling and Load more button pages working with Turbolinks without refreshing page which seemed to be unsuccessful.

Removing Turbolinks was the only (temporary) option to fix this problem.

All pull requests welcome!!