简体   繁体   中英

Rails 3.2, javascript executing twice

I have a brand new rails app that has the following code:

application.js

//= require jquery
//= require jquery_ujs
//= require_tree .

thing.js (lives in same path as application.js)

alert("This is running");

index.html

<%= javascript_include_tag "application" %>

When I navigate to the page, I see the alert twice. Anyone know why? I have no pre-compiled assets.

应用程序布局已经包含application.js文件,所以这是因为application.js被包含两次。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM