I am starting to understand the asset pipeline in rails 3.1 and am now using the jquery-rails gem to its full potential i.e. using
// require jquery_ujs
and not putting the relevant jquery library in my assets/javascripts.js directory ( Rookie mistake i know)
My next question is relating to where i out my jquery/javascript scripts. At present i am placing them all in my application.js file. Would it be better to put the scripts on the relevant pages that they relate to. e.g. at the moment i have a calendar page that uses fullcalendar.js, should i be putting the script on this page under
<script type="text/javascript"> .........</script>
at the bottom of the page, or do i keep it in the application.js file.
I have also noticed that the rendering of my pages that require jquery seem to be loading faster, is this because i am now no longer calling them twice?
All advice appreciated
Thanks