Skip to content

Commit

Permalink
Correct way to add custom JS to Administrate
Browse files Browse the repository at this point in the history
  • Loading branch information
pablobm committed Dec 17, 2023
1 parent 49a7bd6 commit b5eb739
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions spec/example_app/app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//= link administrate-internal/docs.css
//= link admin.css
//= link admin.js

//= link_tree ../images
//= link_tree ../builds
1 change: 1 addition & 0 deletions spec/example_app/app/assets/javascripts/admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert("Annoying alert!");
1 change: 1 addition & 0 deletions spec/example_app/config/initializers/administrate.rb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Administrate::Engine.add_stylesheet("admin")
Administrate::Engine.add_javascript("admin")

0 comments on commit b5eb739

Please sign in to comment.