<%= javascript_include_tag 'javascripts/admin/manage_customer.js' %>
=> <script src="/assets/javascripts/admin/manage_customer.js" type="text/javascript"></script>
如何在Rails 3.1中生成到/javascripts/admin/manage_customer.js
的简单JS链接?
答案 0 :(得分:2)
在此之前加上斜线。
<%= javascript_include_tag '/javascripts/admin/manage_customer.js' %>