Last active
April 13, 2016 02:33
-
-
Save benmacleod/36262da8caa57bdc8e1e285d0f11b611 to your computer and use it in GitHub Desktop.
Debug an AJAX Datatable from the Rails 4 console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using a datatable as per https://github.com/antillas21/ajax-datatables-rails | |
app.get '/things' | |
controller = ThingsController.new | |
controller.request = app.request | |
controller.params = ActionController::Parameters.new({search: 'Thing Name'}) | |
datatable = ThingDatatable.new(controller.view_context) | |
datatable.send(:data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment