Lukas Gutwinski


510 Experience
5 Lessons Completed
0 Questions Solved


Posted in Datatables From Scratch Using Hotwire Discussion

In case you also want to add the current page to the url you can add this link_extra part to the pagy line in the employees controller:
@pagy, @employees = pagy @employees.reorder(sort_column => sort_direction), items: params.fetch(:count, 10), link_extra: 'data-turbo-frame="listings" data-turbo-action="advance"'

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2023 GoRails, LLC. All rights reserved.