diff options
author | Joshua Peek <josh@joshpeek.com> | 2012-10-12 14:57:38 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2012-10-12 14:57:38 -0500 |
commit | bd38d9f2118b1005718f8db4292b21a73879409e (patch) | |
tree | 023697aad4a0475efbf5edb1bbe856d541a9e64f /actionpack/lib/action_view/helpers/asset_tag_helpers | |
parent | b62f51d55d5f0a1a693866f5083dbdb6af0fd237 (diff) | |
download | rails-bd38d9f2118b1005718f8db4292b21a73879409e.tar.gz rails-bd38d9f2118b1005718f8db4292b21a73879409e.tar.bz2 rails-bd38d9f2118b1005718f8db4292b21a73879409e.zip |
Add asset_path and asset_url helpers
Diffstat (limited to 'actionpack/lib/action_view/helpers/asset_tag_helpers')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb index 35f91cec18..90563d6201 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb @@ -43,7 +43,8 @@ module ActionView # Break out the asset path rewrite in case plugins wish to put the asset id # someplace other than the query string. def rewrite_asset_path(source, dir, options = nil) - source = "/#{dir}/#{source}" unless source[0] == ?/ + dir = "/#{dir}" if dir && dir[0] != ?/ + source = File.join(dir.to_s, source) unless source[0] == ?/ path = config.asset_path if path && path.respond_to?(:call) |