Skip to content

Add APIs to remove and clear custom CSS and JS files#2947

Open
goosys wants to merge 1 commit intothoughtbot:mainfrom
goosys:delete_and_clear_js_and_css
Open

Add APIs to remove and clear custom CSS and JS files#2947
goosys wants to merge 1 commit intothoughtbot:mainfrom
goosys:delete_and_clear_js_and_css

Conversation

@goosys
Copy link
Contributor

@goosys goosys commented Nov 28, 2025

The following methods have been added:

  • Administrate::Engine.delete_stylesheet
  • Administrate::Engine.delete_javascript
  • Administrate::Engine.clear_stylesheets
  • Administrate::Engine.clear_javascripts

While custom CSS and JS are automatically injected by plugins, there are cases where application developers may not need them. For example, if their application has already migrated to Stimulus and no longer requires jQuery-based JavaScript, these APIs make it easy to remove or clear unnecessary assets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant