Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby on Rails duplicate of JS files included in HTML
    primarykey
    data
    text
    <p>I should probably first mention that I do not have precompiling on.</p> <p>I have 8 different Js files (7, excluding Application.js) and when I use <code>&lt;%= javascript_include_tag 'application' %&gt;</code> it prints out:</p> <pre><code>&lt;script src="/assets/admin.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/brand.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/category.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/home.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/product.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/setting.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/user.js?body=1" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="/assets/application.js?body=1" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p>Because of this, some of my jQuery (which uses Toggles) do not work because they are being executed multiple times.</p> <p>How do I get it to simply use application.js?</p> <p>My Application.js file:</p> <pre><code>// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery_ujs //= require jquery.ui.all //= require_tree . </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload