Skip to content

Instantly share code, notes, and snippets.

@scottb
Created August 25, 2009 23:17
Show Gist options
  • Save scottb/175112 to your computer and use it in GitHub Desktop.
Save scottb/175112 to your computer and use it in GitHub Desktop.
Reference the Google APIs easily
class GoogleApis
# compiled from http://code.google.com/apis/ajaxlibs/documentation/
LATEST_VERSIONS = {
:jsapi => 'http://www.google.com/jsapi',
:jquery => 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js',
:jqueryui => 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js',
:prototype => 'http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js',
:scriptaculous => 'http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js',
:mootools => 'http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js',
:dojo => 'http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dojo/dojo.xd.js',
:swfobject => 'http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js',
:yui => 'http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/yuiloader/yuiloader-min.js',
:ext_core => 'http://ajax.googleapis.com/ajax/libs/ext-core/3.1.0/ext-core.js',
:chrome_frame => 'http://ajax.googleapis.com/ajax/libs/chrome-frame/1.0.2/CFInstall.min.js',
}
def self.register
ActionView::Helpers::AssetTagHelper.register_javascript_expansion LATEST_VERSIONS
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment