A work-in-progress refactoring to a gem of my personal ajax pagination and search pattern using DataTables and kaminari