Skip to content

Instantly share code, notes, and snippets.

@benmacleod
Last active April 13, 2016 02:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benmacleod/36262da8caa57bdc8e1e285d0f11b611 to your computer and use it in GitHub Desktop.
Save benmacleod/36262da8caa57bdc8e1e285d0f11b611 to your computer and use it in GitHub Desktop.
Debug an AJAX Datatable from the Rails 4 console
# 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