我剛開始我的第一個紅寶石應用程序。紅寶石軌道和資產
我複製需要我的應用程序的資產文件夾中的CSS和JS文件,當我運行應用程序加載到頁面的所有CSS和JS,我不希望出現這種情況
我的看法很簡單
hello
我application.css只是評論
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* 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_self
*= require_tree .
*/
爲什麼所有資產裝入? 我可以「禁用」這個嗎?
我要的是定義文件(CSS,JS)僅與所需specifif頁面
推薦閱讀:http:// guides。 rubyonrails.org/asset_pipeline.html – givanse