Merge pull request #2637 from CodeBlock/2598-backbone-back-button

Fix #2598 (back button issue) by having jQuery force the browser to not cache JSON responses... [ci skip]
This commit is contained in:
Daniel Grippi 2012-01-11 18:13:07 -08:00
commit de29fd5e02

View file

@ -55,7 +55,7 @@ module ApplicationHelper
def jquery_include_tag def jquery_include_tag
javascript_include_tag('//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js') + javascript_include_tag('//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js') +
content_tag(:script) do content_tag(:script) do
"!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\"))".html_safe "!window.jQuery && document.write(unescape(\"#{escape_javascript(include_javascripts(:jquery))}\")); jQuery.ajaxSetup({'cache': false});".html_safe
end end
end end
end end