Rails 管理员:Rails 4 应用程序没有编辑、显示或删除按钮 [英] Rails Admin: No edit, show, or delete buttons for Rails 4 app

查看:32
本文介绍了Rails 管理员:Rails 4 应用程序没有编辑、显示或删除按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将 rails_admin 用于非常基本的 Rails 4 应用程序.

Using rails_admin for a very basic Rails 4 application.

但是,每当我打开仪表板(安装在/admin")时,我都看不到我的每条记录的编辑、显示或删除链接按钮.

However, whenever I open up the dashboard (mounted at '/admin'), I do not see the edit, show, or delete link buttons for each of my records.

有趣的是,如果我手动去显示或编辑路线(即/admin/products/1 或/admin/products/1/edit)页面显示就好了,按预期工作.

Interestingly, if I manually go to the show or edit routes (i.e. /admin/products/1 or /admin/products/1/edit) the page shows up just fine and works as expected.

是否有打开这些链接的配置?

Is there a configuration to turn these links on?

感谢您的帮助.

推荐答案

我想通了!

原来是我的应用程序和 rails_admin 之间的 Bootstrap/FontAwesome 冲突.

It turned out to be a conflict with Bootstrap/FontAwesome between my application and rails_admin.

我使用 Bootstrap 3 和 FontAwesome 4 而我使用的 rails_admin 版本 (0.5.0) 使用 Bootstrap 2 和 FontAwesome 3.

I was using Bootstrap 3 along with FontAwesome 4 whereas the version of rails_admin I'm using (0.5.0) was using Bootstrap 2 with FontAwesome 3.

由于 rails_admin 打算使用旧的 FontAwesome,它使用的是旧式语法(例如icon icon-pencil")而不是新式语法(例如fa fa-pencil").因此,图标没有显示.

Since rails_admin was meant to use the old FontAwesome, it was using the old-style syntax (e.g. 'icon icon-pencil') instead of the new-style (e.g. 'fa fa-pencil'). Because of this, the icons were not showing up.

我通过从我的应用程序中删除 FontAwesome 4 解决了这个问题(我并没有经常使用它)并让 rails_admin 使用捆绑的 FontAwesome 版本.

I resolved this by removing FontAwesome 4 from my app (I wasn't using it much anyway) and letting rails_admin use the version of FontAwesome is was bundled with.

这篇关于Rails 管理员:Rails 4 应用程序没有编辑、显示或删除按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆