Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Monkey patch ActiveAdmin to allow sidebars placed at the top
module ActiveAdmin
class DSL
alias bottom_sidebar sidebar
def top_sidebar(name, options = {}, &block)
config.sidebar_sections.prepend ActiveAdmin::SidebarSection.new(name, options, &block)
end
def sidebar(name, options = {}, &block)
if options.delete(:prepend)
top_sidebar(name, options, &block)
else
bottom_sidebar(name, options, &block)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.