Asset Pipeline: excluding an admin.css file

后端 未结 4 1604
北海茫月
北海茫月 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:23

    soluction is add in config/assets.rb

    #config/assets.rb
    Rails.application.config.assets.precompile  += %w(*.svg *.eot *.woff *.ttf *.gif *.png *.ico *.swf *.xap masonry.pkgd.min.js jquery.colorbox-min.js i18n/jquery.colorbox-pt-BR.js admin.css)
    

    And Add in app/views/layouts/_adm_layout.html.erb

    #app/views/layouts/_adm_layout.html.erb
    <%= stylesheet_link_tag 'admin', media: 'all', 'data-turbolinks-track' => true %>
    

提交回复
热议问题