I'm not an ActiveAdmin expert. I need to have a number of customizations on some index pages. As recommended in the documentation, I'm trying to maintain AA pages build and then customize them by using Javascript. I succeeded by putting my own Javascript file under app/assets/javascripts, and then appending
//=require my_javascript_file
to app/assets/javascripts/active_admin.js
The problem is that this way the Javascript code gets loaded for ANY index page of any model. Which is the best way to insert Javascript code only for a specific model?
Thanks Thomas
For me worked following:
form do |f|
text_node javascript_include_tag "path_to/my_javascript_file"
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With