Permalink
Browse files

Convert source to string if it is present.

  • Loading branch information...
1 parent f632f79 commit d28ed9f5360b54320b2d1baaa2e6d0e3f3f941fc @JuanitoFatas JuanitoFatas committed May 25, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 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(/([\?#].+)$/, '')

0 comments on commit d28ed9f

Please sign in to comment.