Last active
August 10, 2020 11:28
-
-
Save seanlinsley/9786622 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# The Active Admin equivalent of putting this in your application layout: | |
# <head> | |
# <%= cloudinary_js_config %> | |
# </head> | |
module ActiveAdmin | |
module Views | |
module Pages | |
class Base < Arbre::HTML::Document | |
alias_method :original_build_head, :build_active_admin_head | |
def build_active_admin_head | |
original_build_head | |
within @head do | |
text_node include_gon | |
end | |
end | |
end | |
end | |
end | |
end |
Just updated the gist to use alias_method
instead of super
, which appears to work fine
I put it in config/initializers but it still gets error
Uncaught ReferenceError: gon is not defined
If anyone comes across this, the latest stable version of active_admin uses head instead of @Head.
(https://stackoverflow.com/questions/29488362/how-to-include-gazon-gon-in-activeadmin/59735120#59735120)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get this error