Questions tagged [jquery-datatables-rails]

a Ruby gem that includes the jQuery DataTables plugin in the Rails asset pipeline

jquery-datatables-rails is a Ruby gem that includes the jQuery DataTables plugin in the Rails asset pipeline.

References

Related Tags

25 questions
3
votes
0 answers

Datatables for serverside response with custom searching

I have used gem 'jquery-datatables-rails' . We are using it for server side response. We are using railscast #340 for datatables. Initalizing datatable as jQuery -> $('#products').dataTable sPaginationType: "full_numbers" bJQueryUI: true …
2
votes
0 answers

Adding Rails tests to an app with datatables

I have a Rails app with datatables: https://github.com/rweng/jquery-datatables-rails https://github.com/antillas21/ajax-datatables-rails I am going back and adding some tests (minitest) to my app and I wanted to add some basic tests to confirm…
2
votes
2 answers

jquery-datatables-rails gem not applying to table

I'm using rails 4.2.4 and after generating a basic product scaffold I cant seem to get the gem jquery-datatables-rails. I'm using the github readme along with the railscast episode to try and get it working with no luck at…
2
votes
1 answer

How to sort jquery datatables column for associated records in rails

In my rails app, I am using jquery-datatables-rails. It works fine for single model. But if I have associated model then I don't know how to use sort_column function. My code is below0. delegate :params, :h, :link_to, :image_tag,…
user1670773
2
votes
1 answer

Missing FROM-clause with DataTables Global Search

I am using the datatables gem to display a table that has two related tables included. As a result, it is pulling in and displaying columns from three different tables. This is working fine, and I can even sort by the required columns. …
Lloydo
  • 303
  • 1
  • 8
2
votes
0 answers

How to call Datatables API functions in Rails CoffeeScript

I simply wish to call a function called fnGetNodes() to get an array of all nodes. (source of data-tables functions to calls: http://datatables.net/api) I have set up as: # DataTable table = $("#restaurantLocations").DataTable() # Selecting…
Sauron
  • 6,399
  • 14
  • 71
  • 136
2
votes
1 answer

Upgrade to jquery-datatables-rails 2.2.3 from 2.2.1 breaks code in RailsCasts 340 Datatables

This is informational, in that I am posing the question and will provide the answer. It's for the record and to help anyone that follows me here. I build DataTables using RailsCasts 340. They worked great, but I had some struggles with it with…
1
vote
1 answer

Adding sortable column from another tables in datatables

Rails 5.2 datatables I am following a mini tutorial, on implementing databables with Rails. The table class BlogDatatable < AjaxDatatablesRails::ActiveRecord def view_columns @view_columns ||= { id: { source: "Blog.id" }, …
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
1
vote
2 answers

Joins in rails between three tables

I have three tables parents, children and fundings. parent.rb class Parent < ApplicationRecord has_many :children, dependent: :destroy end child.rb class Parent < ApplicationRecord belongs_to :parent has_many :fundings, dependent:…
user9899928
1
vote
1 answer

implementing infinite scrolling with data tables in rails using jquery-datatables-rails

I'm trying to implement infinite scrolling with data tables as described here: and having some issues this is what I've done so far: //JS @.load_datatables = (container, options) -> container = "" if not container? datatable_options = { …
x6iae
  • 4,074
  • 3
  • 29
  • 50
1
vote
1 answer

How to use buttons with jquery-datatables-rails?

I'm trying to add buttons to my DataTable. As instructed in https://github.com/rweng/jquery-datatables-rails I added the dataTables.buttons JS. My application.js: //= require jquery //= require jquery.turbolinks //= require jquery-ui //= require…
Ohad Dahan
  • 371
  • 3
  • 14
1
vote
1 answer

Jquery datatable rails with html5 export buttons not working

I added this gem gem 'jquery-datatables-rails', github: "rweng/jquery-datatables-rails", branch: "master" and then updated my application.js and application.css with //= require dataTables/jquery.dataTables *= require…
0
votes
0 answers

Jquery-Datatables re-initializing on restroration visits

I am using rails 6 app which has turbolinks enabled. I have used jquery-data table on several pages. My issue is when I try to use browser' back and forth buttons, turbolinks performs restoration visit and my jquery-data table is re-initialized. I…
0
votes
1 answer

How to add custom columns to datatable?

I am using gem 'jquery-datatables-rails', '3.4.0' gem 'ajax-datatables-rails' My data table look like My CoffeeScript for this table looks like # Datatables $ -> table = $('#qr-submissions-table').dataTable dom: 'C<"clear">lfrtip' …
Emmanu
  • 749
  • 3
  • 10
  • 26
0
votes
2 answers

Passing variable to controller through Ajax call

Rail 5.2 datatables In my views/books/index.html.slim, I am loading a partial, from another MVC, as follows: = render partial: 'authors/index', :locals => {:author => @book.author} In my views/authors/_index.html, I have the following: ..... …
EastsideDev
  • 6,257
  • 9
  • 59
  • 116
1
2