Rails Admin Customization: embed html view into dashboard

一世执手 提交于 2019-12-12 09:48:49

问题


We have removed the dashboard and the history from the rails admin starting page:

Now we want to embed a google analytics page for users to see the dashboards from GA. This page consists of some simple HTML.

QUESTION: How do you embed html pages in the Rails Admin Dashboard.


回答1:


The answer was very simple, I needed to create the following file:

views/rails_admin/main/dashboard.html.erb

And this overwrites the standard dashboard, easy as that.

Found the information here




回答2:


I can provide a partial answer to your question which is a complete answer to your question. The answer to your question is to use a partial:

Partial templates - usually just called "partials" - are another device for breaking the rendering process into more manageable chunks. With a partial, you can move the code for rendering a particular piece of a response to its own file.

Full details in the Layouts and Rendering documentation.



来源:https://stackoverflow.com/questions/25379017/rails-admin-customization-embed-html-view-into-dashboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!