8

activeadmin影响前端样式的解决方法

 3 years ago
source link: http://blog.ilibrary.me/2019/08/01/activeadmin%E5%BD%B1%E5%93%8D%E5%89%8D%E7%AB%AF%E6%A0%B7%E5%BC%8F%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
activeadmin影响前端样式的解决方法 | 垂钓江湖
欢迎转载,请支持原创,保留原文链接:blog.ilibrary.me

ActiveAdmin是一个非常好用的web后台管理gem,功能丰富,灵活多变。

但是,它的样式默认会影响前端页面。

这个问题在每个用activeadmin的新项目中都会遇到,所以记录下来供后面参考。

stackoverflow上面提供了一个方法

  1. 首先在vendor/目录下创建assets目录
  2. 在vendor/assets目录下创建两个子目录, stytlesheets和javascripts
  3. 把assets/stylesheets/active_admin.css 移动到vendor/assets/stylesheets/active_admin.css
  4. 把assets/javascripts/active_admin.js.coffee移动到vendor/assets/javascripts目录下面去
  5. 重启rails server, 问题解决.
扫描二维码分享到微信朋友圈Loading...Please waitqrcode.php?url=%2F2019%2F08%2F01%2Factiveadmin%25E5%25BD%25B1%25E5%2593%258D%25E5%2589%258D%25E7%25AB%25AF%25E6%25A0%25B7%25E5%25BC%258F%25E7%259A%2584%25E8%25A7%25A3%25E5%2586%25B3%25E6%2596%25B9%25E6%25B3%2595

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK