Skip to content

Instantly share code, notes, and snippets.

@brennandunn
Created July 27, 2008 21:21
Show Gist options
  • Save brennandunn/2810 to your computer and use it in GitHub Desktop.
Save brennandunn/2810 to your computer and use it in GitHub Desktop.
def yui_js(arr)
defaults = [ 'yahoo-dom-event/yahoo-dom-event' ]
base = 'http://yui.yahooapis.com/combo?'
prefix = '2.5.2/build/'
src = base + (defaults + arr).uniq.map { |s| prefix + s }.join('&') + '.js'
%|<script type="text/javascript" src="#{src}"></script>|
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment