--使用: (1)layout中使用<%=yield(:js)%> (2)html中使用<% content_for :js do %>[XXX]<% end %> 转载于:https://www.cnblogs.com/gary-tao/p/5893497.html