-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add engine class methods for registering assets
Problem: When developing a plugin for Administrate, there is not a good way to define custom javascripts or stylesheets to be included on admin pages. Existing solutions either use `content_for` at the field level, or require the end user to override Administrate's javascript partial. Solution: Add methods to `Administrate::Engine` to keep track of the assets that need to be loaded on each admin page. Plugin developers can now use these helpers in their engine definition: ```ruby Administrate::Engine.add_javascript "my_plugin/script" Administrate::Engine.add_stylesheet "my_plugin/styles" ```
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters