I just picked up Ruby for Rails last week, and I'm guessing that I have some problems with the asset pipeline. Specifically, I want to override the default styling of the DataTables table in my Rails 4 application, but changing custom.css.scss does nothing. The styling is apparently coming from dataTables/jquery.dataTables. All I'm trying to do is to stripe the table so that alternating rows have different background colors, along the lines of:
tr.odd {
background-color: pink;
}
tr.even {
background-color: red;
}
Where, exactly, is this datatables.css file installed in my application's file tree so that I can edit or replace it, or if it's not local, where can I install my own custom file to override its specifications?
application.css:
*= require_self
*= require_tree .
*= require jquery.ui.core
*= require jquery.ui.theme
*= require dataTables/jquery.dataTables
Note: If I remove the jquery.dataTables requirement, my custom.css.scss takes effect.
gemfile:
# Use jquery as the JavaScript library
gem 'jquery-rails'
# JQuery UI
gem 'jquery-ui-rails'
# Datatables JQuery plugin
gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git'
Edit:
Just to note: I've tried to include a stylesheet called jquery.datatables.css under .app/assets/datatables/jquery.dataTables.css, but Rails just ignores it. The idea came from this article, but either I'm misinterpreting what the author is saying or it doesn't work in Rails 4.