Modify javascript_include_tag to use google's Ajax Library Api
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tasks
test
MIT-LICENSE
README
Rakefile
init.rb
install.rb
uninstall.rb

README

Googtaculous
============

Modifies how javascript_include_tag works, so that Rails javascript files are served from Google's Ajax Library API.
Local javascript is used when ActionController::Base.consider_all_requests_local is true, which is true in development mode.

Example
=======

<%= javascript_include_tag 'prototype', 'effects' %>

Expands to:

<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/effects.js" type="text/javascript"></script>


Additionally,

<%= javascript_include_tag :defaults %>

expands to 

<script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/effects.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/dragdrop.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2/controls.js" type="text/javascript"></script>
<script src="/javascripts/application.js?1213130636" type="text/javascript"></script>


Copyright (c) 2008 [Matthew Higgins], released under the MIT license