24 questions
1
vote
1
answer
2k
views
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-...
0
votes
2
answers
543
views
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 ...
1
vote
1
answer
341
views
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
@...
1
vote
2
answers
880
views
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
...
0
votes
1
answer
999
views
mvc how to display datetime in date format
In Mvc how to display DateTime in Date Format Like
1/1/2015 12:00:00 AM, This Date Format I Wana to show 1/1/2015
<table id="table_id">
<thead>
<tr>
<td&...
2
votes
0
answers
204
views
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 ...
0
votes
1
answer
1k
views
Search Datatable after data loaded
I'm using DataTables 1.10 in a Rails 4.2 project. I have the following in a js asset file:
var table = $('#ticket_details').DataTable({
stateSave: true,
deferRender: true,
ajax: $('#ticket_details')....
0
votes
2
answers
693
views
DataTables + yadcf Add a Class to Filtered Column
Is there a way to add a class to filtered columns using yadcf?
As for now, When I filter a column on my table using a select box provided by yadcf, I can't seem to show that the column is filtered.
I ...
0
votes
1
answer
879
views
Ajax Datatables Rails - Query not working for show-method
Let's start with the database-model:
# => ProductSelection.rb
has_many :products, -> { uniq }, through: :product_variants
# => Product.rb
has_many :product_informations
belongs_to :...
1
vote
1
answer
1k
views
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 ...
0
votes
1
answer
219
views
Responsive Details Not Showing On jquery-datatables-rails
I've been trying to make this work and I can't seem to find a solution:
I have a table and I have a basic initialization of the Datatables everything seems to work fine but once the responsive gets ...
1
vote
1
answer
2k
views
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 ...
2
votes
2
answers
1k
views
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 ...
1
vote
1
answer
1k
views
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....
2
votes
1
answer
1k
views
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 :...
0
votes
1
answer
585
views
Adding data makes dataTables to disappear - Can't have data in my table otherwise dataTable doesn't work
I am a beginner on Ruby on Rails and I am currently developing an application for which I would like to install the gem dataTables. Once I have installed the gem and followed the instructions nothing ...
2
votes
1
answer
444
views
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 ...
0
votes
1
answer
955
views
Return multiple rows from table to Rails controller action
Rails 4.0.1, Ruby 2.0.0, Datatables 1.10, jquery-datatables-rails 3.1.1
I have a table that has multiple rows selected by specifying a class of .active on the desired rows. I want to return the ...
2
votes
0
answers
242
views
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 = $("#...
0
votes
1
answer
92
views
Need two buttons to index either all items or items current user is assigned?
Ruby 2.0.0, Rails 4.0.3, jquery-datatables-rails 2.2.3 (DataTables 1.10.2)
I would like to have two buttons on my form, one to display all items and another to display only those items currently ...
2
votes
1
answer
382
views
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 ...
0
votes
1
answer
779
views
Selenium through Capybara not loading page with jQuery dataTables 1.10.0
I upgraded our dataTables today from jQuery 1.9.2 to 1.10.0 through the https://github.com/rweng/jquery-datatables-rails gem. I performed all of the upgrade steps and everything works out now in the ...
0
votes
0
answers
365
views
Coffeescript to detect events in jquery-datatables-rails
I apparently have no CoffeeScript-fu.
I've got a Rails 4.1 app with jquery-datatables-rails and everything works perfectly.
However, I would like to hide a class any time the datatable is ordered ...
3
votes
0
answers
1k
views
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
...