Skip to content

Commit

Permalink
Always remove force from options hash
Browse files Browse the repository at this point in the history
This avoids force="true" on the script tags if force: true is set outside
of OFFLINE environments.
  • Loading branch information
felixbuenemann committed May 24, 2014
1 parent bd58403 commit 9ece9c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jquery-rails-cdn.rb
Expand Up @@ -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')}'))")
Expand Down

0 comments on commit 9ece9c3

Please sign in to comment.