How to add a link back to the application in ActiveAdmin?

前端 未结 3 1266
陌清茗
陌清茗 2021-01-12 08:35

I need to add a few links to certain pages of the application in the ActiveAdmin pages. I can do this using sidebars, but I\'ll have to repeat the code for each of my resour

3条回答
  •  隐瞒了意图╮
    2021-01-12 09:30

    i think there is no build-in way to do it, but you can override the render-logic in the TabsRenderer (2.2) / TabbedNavigation (3.0):

      def render_menu(menu)
        content_tag :ul, :id => @options[:id] do
          menu.items.collect do |item|
            render_item(item)
          end.join.<<('your_custom_stuff').html_safe
        end
      end
    

提交回复
热议问题