lib/jquery-rails-cdn.rb in jquery-rails-cdn-yjchen-0.3.1 vs lib/jquery-rails-cdn.rb in jquery-rails-cdn-yjchen-0.3.2

- old
+ new

@@ -29,24 +29,30 @@ def jquery_ui_url(name, options = {}) return CDNS[:jquery_ui][name] end def jquery_include_tag(name, options = {}) + jquery = 'jquery' + jquery = jquery + '.min' if options[:compressed] + if OFFLINE and !options[:force] - return javascript_include_tag(:jquery) + return javascript_include_tag(jquery) else [ javascript_include_tag(jquery_url(name, options)), - javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(:jquery).gsub('<','%3C')}'))") + javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(jquery).gsub('<','%3C')}'))") ].join("\n").html_safe end end def jquery_ui_include_tag(name, options = {}) + jqueryui = 'jquery-ui' + jqueryui = jqueryui + '.min' if options[:compressed] + if OFFLINE and !options[:force] - return javascript_include_tag(:'jquery-ui') + return javascript_include_tag(jqueryui) else [ javascript_include_tag(jquery_ui_url(name, options)), - javascript_tag("window.jQuery.ui || document.write(unescape('#{javascript_include_tag(:'jquery-ui').gsub('<','%3C')}'))") + javascript_tag("window.jQuery.ui || document.write(unescape('#{javascript_include_tag(jqueryui).gsub('<','%3C')}'))") ].join("\n").html_safe end end end