Customize rails_admin to include self-created views and controllers

前端 未结 1 1437
日久生厌
日久生厌 2020-12-17 03:53

I started using rails_admin engine lately and can\'t quite figure out how I can add my own pages to it. My requirement exactly is that I have a controller and view that fetc

相关标签:
1条回答
  • 2020-12-17 04:19

    If you want to display this as a tab, take a look at RailsAdmin's new custom actions.

    I just gave some examples and links in my answer to this question.


    If you don't want to add this functionality as a custom action, you can:

    • Map a route to your controller & action
    • Have your controller inherit from RailsAdmin MainController and write code for your action
    • Include a view for your action
    • Copy a RailsAdmin view over to add it in as a tab

    However, I'd recommend the custom action approach because it does not require you to keep your copied RailsAdmin view updated.

    0 讨论(0)
提交回复
热议问题