Rails - how to include Javascript files only on certain pages
<p>I have a WYSIWYG editor that I have built into the site and customised. There are a lot of Javascript files that only need to be loaded on the pages with the WYSIWYG editor; currently they are loaded on every page (and even break other Javascript on certain pages). </p>

<p>Currently the Javascript files are in <code>assets/javascript/wysiwyg/</code> and aren't included as the require files in <code>application.js</code> but are still included on every page because of the assets pipeline (I think).</p>

<p>I want to know if I can <em>exclude</em> these files from the other pages.  Is it possible to move them from the assets pipeline to the <code>public/</code> directory and import them (in the coffee script files, maybe?) into the appropriate views?</p>