Module: FujiAdmin::ActiveAdminPatch
- Defined in:
- lib/fuji_admin/active_admin_patch.rb
Overview
Injects <meta> tags into ActiveAdmin’s <head> so the palette JavaScript can read the FujiAdmin config at runtime without requiring the host app to touch its layout.
Applied by prepending onto ActiveAdmin::Views::Pages::Base once AA is loaded. If AA isn’t present the prepend silently no-ops.
Instance Method Summary collapse
Instance Method Details
#build_active_admin_head ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/fuji_admin/active_admin_patch.rb', line 9 def build_active_admin_head super within @head do (name: "fuji-palette-picker", content: FujiAdmin.config.palette_picker.to_s) (name: "fuji-default-palette", content: FujiAdmin.config.default_palette.to_s) end end |