Matey Johnson
Matey Johnson

Reputation: 227

ActiveAdmin upgrade broke select2-rails : No select2/compat/inputData

I have updated my active_admin gem to 1.4.3 but as a result it seems it has broken select2-rails gem and the error that I'm getting is:

Uncaught error: No select2/compat/inputData

Ruby: 2.5
Active_admin: 1.4.3
Rails: 4.2.11.1
select2-rails: 3.5.9.1

Attaching the screenshot of error: enter image description here

active_admin.js.coffee

#= require select2

active_admin.css.scss

@import "select2";
//= require select2

Gemfile

gem 'select2-rails','3.5.9.1'

application.css

*= require select2

application.js

//=require select2

sample.js

$(document).ready ( function() {
    $(".select2_custom_class").select2({
        allowClear: true,
        placeholder: 'something',
        minimumInputLength: 1,
        maximumInputLength: 10,
        dropdownAutoWidth: true,
        ajax: {
            type: 'GET',
            url: '',
            dataType: 'json',
            results: function(val,page){
            }
        }
  })
});

Upvotes: 2

Views: 322

Answers (0)

Related Questions