Getting wice_grid to work with Rails

Step 1

Add the gem to Gemfile:

gem 'wice_grid'

Run bundle install.

Step 2

Add the require statement in application.js:

//= require jquery3
//= require jquery_ujs
//= require jquery-ui
//= require popper
//= require wice_grid
//= require bootstrap
//= require turbolinks
//= require_tree .

Step 3

In application.scss add the import statement for wice_grid.

@import 'bootstrap';
@import "wice_grid";
@import "font-awesome-sprockets";
@import "font-awesome";

Step 4

You must initialize wice_grid to get sort, search and reset to work. Make sure it is initialized after Turbolinks is loaded on the page.

<script type='text/javascript'>
  $(document).on('turbolinks:load', function() {

Add this to the application layout file just before the body tag closes.

Related Articles

Create your own user feedback survey