aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2016-08-23 12:20:48 -0500
committerschneems <richard.schneeman@gmail.com>2016-08-29 13:16:07 -0500
commit44840cc85aaadd81b248cbce655155b6d259e596 (patch)
tree445878672fa56b0794160f080b522e18842a70e3 /actionview/lib/action_view/helpers
parentfc16af47ba941ce8c0125653fa3bf399d68a586c (diff)
downloadrails-44840cc85aaadd81b248cbce655155b6d259e596.tar.gz
rails-44840cc85aaadd81b248cbce655155b6d259e596.tar.bz2
rails-44840cc85aaadd81b248cbce655155b6d259e596.zip
Do not deprecate using assets with leading slash
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/asset_url_helper.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb
index 50b13c0271..ba695791b1 100644
--- a/actionview/lib/action_view/helpers/asset_url_helper.rb
+++ b/actionview/lib/action_view/helpers/asset_url_helper.rb
@@ -141,16 +141,11 @@ module ActionView
source = "#{source}#{extname}"
end
- if options[:public_folder]
- source = public_compute_asset_path(source, options) unless options[:raw]
- else
- if source[0] != ?/
- source = compute_asset_path(source, options) unless options[:raw]
- elsif !options[:raw]
- message = "Skipping computing asset path since asset #{ source.inspect } starts with a slash `/`.\n"
- message << "This behavior is deprecated and will be removed. Instead explicitly\n"
- message << "use a `public_*` helper instead. Optionally pass in `raw: true` to get the exact same behavior."
- ActiveSupport::Deprecation.warn(message)
+ if source[0] != ?/
+ if options[:public_folder]
+ source = public_compute_asset_path(source, options)
+ else
+ source = compute_asset_path(source, options)
end
end