Rails 3.1 javascript_include_tag

时间:2011-08-25 17:44:27

标签: ruby-on-rails-3 ruby-on-rails-3.1

<%= 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链接?

1 个答案:

答案 0 :(得分:2)

在此之前加上斜线。

<%= javascript_include_tag '/javascripts/admin/manage_customer.js' %>