Skip to content

Include javascript before the rest of the active_admin javascripts

Jarin Udom edited this page Feb 24, 2014 · 1 revision

This is useful if you need to load a library before configuring it, for example. Put this in config/initializers/active_admin.rb

# Load filepicker.js before all the other stuff
current_javascripts = config.javascripts.clone
config.clear_javascripts!
config.register_javascript '//api.filepicker.io/v1/filepicker.js'
current_javascripts.each{ |j| config.register_javascript j }
Clone this wiki locally