Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #15312 from JuanitoFatas/action_view/asset_path

Convert source to string if it is present.
  • Loading branch information...
commit 21ec7fefea5a1b823cb88733b019b3d52240801d 2 parents 2bb6b51 + d28ed9f
@senny senny authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  actionview/lib/action_view/helpers/asset_url_helper.rb
View
2  actionview/lib/action_view/helpers/asset_url_helper.rb
@@ -118,8 +118,8 @@ module AssetUrlHelper
# asset_path "application", type: :stylesheet # => /stylesheets/application.css
# asset_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js
def asset_path(source, options = {})
- source = source.to_s
return "" unless source.present?
+ source = source.to_s
return source if source =~ URI_REGEXP
tail, source = source[/([\?#].+)$/], source.sub(/([\?#].+)$/, '')
Please sign in to comment.
Something went wrong with that request. Please try again.