是否有可能通过使用辅助方法以某种方式在清单中要求scss文件?
/*
*= require_self
*= require '<%= current_tenant.name %>'
*/
目前引发couldn't find file '<%= current_tenant.name %>'
错误。我尝试将application.scss
重命名为application.scss.erb
,但仍无效。
答案 0 :(得分:0)
application.css.erb
*= require dataTables/jquery.dataTables
*= require "<%= p"dataTables/jquery.dataTables" %>"
*
我甚至尝试过这样的
*= require dataTables/jquery.dataTables
*= require "<%= p"dataTables/jquery.dataTables" + (12*12).to_s %>"
*
我得到的输出是
*= require_tree ../../../vendor/assets/stylesheets/.
*= require dataTables/jquery.dataTables
*= require "dataTables/jquery.dataTables144"
*
所以可能你应该这样试试。您需要用双引号
包装嵌入的ruby代码/*
*= require_self
*= require "<%= current_tenant.name %>"
*/