DataTables is a nifty jQuery plugin that adds the ability to paginate, sort, and search your HTML tables. When dealing with large tables (more than a couple of hundred rows) however, we run into performance issues. These can be fixed by using server-side pagination, but this breaks some DataTables functionality. ajax-data tables-rails is a wrapper around DataTables ajax methods that allow synchronization with server-side pagination in a Rails app. It was inspired by this Railscast. I needed to implement a similar solution in a couple of projects I was working on, so I extracted a solution into a gem. The final goal of this gem is to generate JSON content that will be given to jQuery DataTables. All the data table customizations (header, tr, td, CSS classes, width, height, buttons, etc.) must take place in the javascript definition of the data table. jQuery DataTables is a very powerful tool with a lot of customization available. Take the time to read the doc.

Features

  • Customize the generated Datatables class
  • Generate the datatable class
  • Get Raw Records
  • Setup the Controller action
  • Wire up the Javascript
  • Use view helpers

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow ajax-datatables-rails

ajax-datatables-rails Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of ajax-datatables-rails!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Libraries

Registered

2023-09-25