Reputation: 2025
When you add a sidebar in the index view, it shows up after the filter sidebar.
I'd like my own sidebar to appear before the filter sidebar.
Any ideas?
Upvotes: 1
Views: 252
Reputation: 11
I wrote the following:
ActiveAdmin::Views::Pages::Base.class_eval do
# Renders the sidebar
def build_sidebar
a = []
sidebar_sections_for_action.collect do |section|
a = [a, section].flatten.compact
end
div id: "sidebar" do
a.reverse.each do |section|
sidebar_section(section)
end
end
end
end
save the above in app/admin/active_admin_extensions.rb, good luck.
Upvotes: 1