title: What is a good way of implementing per-page JavaScript in Rails?
body: <p>Trying new things in Ruby - on each page I'm doing very rich stuff with jquery. Obviously if I put all the jquery into application.js it's going to grow very large very quickly.</p>
  
  <p>Is it a good approach to lazy-load a page-specific js file at the end? eg:</p>
  
  <pre><code>&lt;script&gt;
  
  $(document).ready(function() {
  
    $.getScript("/javascripts/this_pages_scripts.js");
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Is there a rails-way way of doing this? I am aware of the new.js.erb etc. files and ujs, but I am still talking about more page-specific js - you know, drag and drop initialisers, dialog creators, etc.</p>
  
  <p>Thank you very much.</p>