From 9ece9c35d802b1fca797ce3e5e27542aee2076eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Sat, 24 May 2014 23:15:38 +0200 Subject: [PATCH] Always remove force from options hash This avoids force="true" on the script tags if force: true is set outside of OFFLINE environments. --- lib/jquery-rails-cdn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jquery-rails-cdn.rb b/lib/jquery-rails-cdn.rb index 01d28eb..1e2d062 100644 --- a/lib/jquery-rails-cdn.rb +++ b/lib/jquery-rails-cdn.rb @@ -18,7 +18,7 @@ def jquery_url(name) end def jquery_include_tag(name, options = {}) - return javascript_include_tag(:jquery, options) if OFFLINE and !options.delete(:force) + return javascript_include_tag(:jquery, options) if !options.delete(:force) and OFFLINE [ javascript_include_tag(jquery_url(name), options), javascript_tag("window.jQuery || document.write(unescape('#{javascript_include_tag(:jquery, options).gsub('<','%3C')}'))")