Skip to main content

All Questions

1 vote
2 answers
371 views

Rals 7, jQuery, Datatables - this.each is not a function

I have an issue running with jquery 3.6.3 and I am using datatables.net-bs4. (I am targeting bootstrap 4) I created a barebones Rails 7 App: rails _7.0.4_ new rails7BStestapp -T --css=bootstrap -j ...
phil's user avatar
  • 4,928
0 votes
0 answers
553 views

Create Edit & Delete Button on DataTables using AJAX ruby on rails

I am using DataTables with Ruby On Rails. have the datasource setup for AJAX but i am trying to add an Edit Button to edit any record individually I have the following code $('#table').DataTable(...
Alfred Mey's user avatar
1 vote
1 answer
264 views

tablesorter is not a function rails 6 error

I am trying to add tablesorter to my tables but I end up with the following error on the browser console. Uncaught TypeError: n(...).tablesorter is not a function Here is my application.js: // This ...
Sayan Patel's user avatar
0 votes
0 answers
586 views

Datatable searching in specific range not working in rails

$(document).ready(function(){ var table = $("#friendstable").DataTable({ "processing": true, "serverSide": true, "columnDefs": [{ "orderable": false, "targets": -1 }], ...
abcd's user avatar
  • 1
0 votes
1 answer
1k views

Wait for turbolinks to load before loading a <script> tag

I've had an issue I couldn't solve in another post its problem, in short, is that DataTables isn't loading until I refresh the page. so I thought about solving it by adding a turbolinks:load event ...
cratag's user avatar
  • 122
0 votes
2 answers
451 views

Script loading before turbolinks is ready? $(...).DataTable is not a function

I have the following code: <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.js"></script> <script ...
cratag's user avatar
  • 122
0 votes
1 answer
592 views

Pagination issue with jquery DataTables and will_paginate gem on Rails 5.2

I am implementing jQuery DataTables in my application based on this tutorial. I could use a packaged Gem, but I need to understand and learn what's underneath. My purpose is to display the Values from ...
user1185081's user avatar
  • 2,118
0 votes
2 answers
345 views

Why does datatables.net work in my rails development env but not when deployed to heroku?

For my first Rails 6 project I'm trying to use datatables (jQuery plugin) in combination with bootstrap 5 so that I can get fancy table sorting on every HTML table. Locally in my rails development ...
Bart's user avatar
  • 385
3 votes
1 answer
86 views

Id field using "accepts_nested_attributes_for" disappears when using datatables in Rails

Background: I am using simple_form to render nested attributes of an association in rails. I have applied jquery-datatables gem on the edit form for the nested association using simple_fields_for. My ...
nuclearmc2's user avatar
0 votes
0 answers
26 views

Rails + jQuery DataTables CellIndex Problem

I'm using jQuery DataTables in two of my Rails 6 applications. In one application it works fine, in the other application I can't get it to work. I always get the following error: Uncaught ...
Max Kirsch's user avatar
0 votes
1 answer
952 views

Rails parse JSON response for jQuery Datatables

I have a small problem with the ajax function of jQuery DataTables and with the JSON response, I get in my Rails 6 application. I'm successfully accessing the route and getting back a JSON response. ...
Max Kirsch's user avatar
0 votes
1 answer
169 views

Why does my rails app that uses Datatables not draw tables correctly when I use the back button, but does when I refresh the page?

I have built a rails app, using rails 5.2.3 and ruby 2.6.3 for browsing the user logs for another application and editing its users and their status. It's a simple app and I use rails Datatables to ...
John Wooten's user avatar
5 votes
3 answers
9k views

Rails 6 + Webpack, Datatables, jQuery

I have a "Select All" button that uses this code: <script type='text/javascript'> $('#check_all').on("click", function() { $('input[type="checkbox"]').click(); }); </script&...
Maayan Naveh's user avatar
0 votes
3 answers
944 views

Rails 6 + Webpack + jQuery doesn't save changes when refreshed

I'm trying to fix some console errors in a Rails 6 + Webpack app, and even though after the change I restart the server, the changes don't seem to be saved. For example, I get this error: ...
Maayan Naveh's user avatar
0 votes
0 answers
865 views

Ruby on Rails - Datatables Server Side Processing - drawing 1 and not paginating

I am currently working on a new Ruby on Rails web app and I am in need of using Datatables.js. However I have not used AJAX in the past. I am using datatables.js manually rather that with the ajax-...
user3436334's user avatar

15 30 50 per page
1
2 3 4 5
8