If you look at the activeadmin base manifest file, you will see where the additional jquery download is called. The final call in the base manifest is the activeadmin application manifest. Therefore, there is an easy way to get around unwanted extra jquery loading.
Change this line in application / app / assets / javascripts / active _admin.js:
//= require active_admin/base
For
//= require active_admin/application
This way the active javascript admin code will be loaded without restarting jquery.
Inside / admin space, the active admin loads active_admin.js without loading application.js, so you also need to download application.js. In order to work, you need to make active download admin.js to active_admin.js. Add this to config / initializers / active_admin.rb:
current_javascripts = config.javascripts.clone config.clear_javascripts! config.register_javascript 'application.js' current_javascripts.reverse.each{|j| config.register_javascript j}
However, please note that for this to work, you may need all these declarations in the app.js application manifest:
//= require jquery //= require jquery-ui //= require jquery_ujs
Also, when application.js is loaded into the active admin, you need to manage any namespace conflicts yourself.
source share