Asset Pipeline: excluding an admin.css file

后端 未结 4 1608
北海茫月
北海茫月 2021-02-05 03:55

I upgraded a Rails 3.0 app to Rails 3.1 which involved putting this

/*
*= require_self
*= require_tree .
*/

in the application.css file. Howeve

4条回答
  •  心在旅途
    2021-02-05 04:22

    Another solution is to have two directories in app/assets/stylesheets, for example, a public directory and an admin directory.

    Then, in app/assets/stylesheets/application.css, you can change require_tree . to require_tree ./public.

    You might have to do something similar on the admin side. I happen to be using the Administrate gem which knows where to find its own assets.

提交回复
热议问题