This project is archived and is in readonly mode.
Windows File Loading
-
rasmus
- Tag set to 2.1, actionpack, bug
Hi,
We came across the same problem, and thought that the correct solution maybe was to replace the OR with an AND. With the line resulting to:
source += ".#{ext}" if ext && File.extname(source).blank? && File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}"))
-
Andreas
The patch above is incorrect, it breaks javascript_include_tag for js being served by a controller. I believe the intended logic is to check that ext is defined for both statements separately (that works anyway):
source += ".#{ext}" if (ext && File.extname(source).blank?) || (ext && File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}"))) -
Andreas
I made a pull request for this, but it told me to attach a git formatted patch instead. So here:
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack index ed33f08..9177dc1 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -485,7 +485,7 @@ module ActionView
source = COMPUTED_PUBLIC_PATHS.fetch(cache_key) do begin-
source += ".#{ext}" if ext && File.extname(source).blank? || File -
source += ".#{ext}" if (ext && File.extname(source).blank?) || (e if source =~ %r{^[-a-z]+://} source
-
-
Andreas
Oops, here's the patch as an attachmen :)
-
Frederick Cheung
- State changed from new to duplicate
Duplicate of #1085 asset_tag_helper.rb expression bug in compute_public_path, which was resolved
