Skip to content

Commit

Permalink
use resource caching when the javascripts cache directory is writable
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jun 23, 2010
1 parent 2e8418f commit 34cc5dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vendor/plugins/refinery/app/views/admin/_head.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%
# Internet Explorer is fine with JS caching, but cache CSS and kaboom.
# Would be great if someone could fix this?
js_caching = RefinerySetting.find_or_set(:use_resource_caching, !Refinery.s3_backend)
js_caching = RefinerySetting.find_or_set(:use_resource_caching, Rails.root.join('public', 'javascripts', 'cache').writable?)
css_caching = js_caching && request.env['HTTP_USER_AGENT'] !~ /MSIE/
-%>
<head>
Expand Down
2 changes: 1 addition & 1 deletion vendor/plugins/refinery/lib/refinery/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def image_fu(image, thumbnail = nil , options={})
# Use <%= jquery_include_tags %> to include it in your <head> section.
def jquery_include_tags(options={})
# Merge in options
options = { :caching => RefinerySetting.find_or_set(:use_resource_caching, !Refinery.s3_backend),
options = { :caching => RefinerySetting.find_or_set(:use_resource_caching, Rails.root.join('public', 'javascripts', 'cache').writable?),
:google => RefinerySetting.find_or_set(:use_google_ajax_libraries, false),
:jquery_ui => true
}.merge(options)
Expand Down

0 comments on commit 34cc5dd

Please sign in to comment.