Select2-rails is not working with ActiveAdmin

Sunday, May 4, 2014

I have difficulties integrating select2-rails with ActiveAdmin. I followed setup steps on Select2-rails Github page: http://ift.tt/1a4WjRF and I added line:



//= require select2


to app/assets/javascripts/application.js and line:



*= require select2


to app/assets/stylesheets/application.css


so I assume when I have page in ActiveAdmin I should be able to add line:



$('#add_student_select').select2()


to active_admin.js.coffee


But its not working. In console I can see following error:



Uncaught TypeError: undefined is not a function
(anonymous function)
fire
self.fireWith
jQuery.extend.ready
completed


Do I integrate it correctly? I don't think that ActiveAdmin is able to get even access to the librabry.







http://ift.tt/1lQ5lFc