Skip to content

Instantly share code, notes, and snippets.

@seanlinsley
Last active August 10, 2020 11:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seanlinsley/9786622 to your computer and use it in GitHub Desktop.
Save seanlinsley/9786622 to your computer and use it in GitHub Desktop.
# 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
@simicic
Copy link

simicic commented Aug 10, 2020

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