Skip to content

Instantly share code, notes, and snippets.

@tubbo
Forked from bennyzr/gist:0bd5d7c59c69010dec73fa4576a5a04d
Last active December 13, 2016 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tubbo/06f963d8ff1470df15239f3a795dbf10 to your computer and use it in GitHub Desktop.
Save tubbo/06f963d8ff1470df15239f3a795dbf10 to your computer and use it in GitHub Desktop.
Insert tag into Active Admin body tag to disable turbolinks
ActiveAdmin::Views::Pages::Base.class_eval do
def build(*args)
super
add_classes_to_body
add_attributes_to_body
build_active_admin_head
build_page
end
def add_attributes_to_body
@body.attributes[:"data-no-turbolink"] = "true"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment