我有一个名为 admin 的视图,我想使用仅在此页面中使用的 css 文件 admin.css。我在布局中创建了一个新的布局 admin.html.erb。我在其中放了什么以及如何编辑 application.css 以便 admin.css 仅在管理视图中使用,但所有其他样式表也包含在管理视图中?
谢谢!到目前为止,这就是我在 application.css 中所拥有的
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require bootstrap_and_overrides
*= require custom
*= require admin
*= require_self
*/