See here:
application.js
// This is a manifest file that’ll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they’ll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It’s not advisable to add code directly here, but if you do, it’ll appear at the bottom of the
// the compiled file.
//
//= require jquery_ujs
// your stuff below
jquery.js
// This is a manifest file that’ll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they’ll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It’s not advisable to add code directly here, but if you do, it’ll appear at the bottom of the
// the compiled file.
//
// This is the fallback file that is used when all other things fail.
//= require jquery
//= require jquery-ui
head.js
// This is a manifest file that’ll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they’ll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It’s not advisable to add code directly here, but if you do, it’ll appear at the bottom of the
// the compiled file.
//
//
//= require external_head/modernizr-2.0
your footer template (I left a lot of other stuff in there, might be helpful)
%script{:type=>‘text/javascript’}
="window.loginStatus = {loggedIn: #{current_user ? 'true' : 'false'} , service_facebook : #{current_user && current_user.service_facebook? ? 'true' : 'false'} , service_twitter : #{current_user && current_user.service_twitter? ? 'true' : 'false'} };"
= javascript_include_tag “http://connect.facebook.net/en_US/all.js”
= javascript_include_tag “http://ajax.googleapis.com/ajax/libs/jquery/#{APP_JQUERY_VERSION}/jquery.min.js”
= javascript_include_tag “http://ajax.googleapis.com/ajax/libs/jqueryui/#{APP_JQUERYUI_VERSION}/jquery-ui.min.js”
-jquery_path = asset_path(‘jquery.js’)
:javascript
!window.jQuery && document.write(unescape('%3Cscript src="#{jquery_path}"%3E%3C/script%3E'))
= javascript_include_tag “http://maps.google.com/maps/api/js?sensor=false&key=#{APP_GOOGLE_MAPS_KEY}”
= yield :templates
= javascript_include_tag “application”, :debug => Rails.env.development?
/[if lt IE 8 ]
= javascript_include_tag '[http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js](http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js)'
:javascript
try { CFInstall.check({mode: "overlay",destination: "[http://freshfugu.com](http://freshfugu.com)"}); } catch(ex) {}
-# Append your own using content_for :javascripts
= yield :javascripts
-# yui profiler and profileviewer
-#- if Rails.env == ‘development’
-# = javascript_include_tag ‘profiling/yahoo-profiling.min’, ‘profiling/config’