diff options
author | kenta-s <knt01222@gmail.com> | 2017-01-13 12:04:10 +0900 |
---|---|---|
committer | kenta-s <knt01222@gmail.com> | 2017-01-13 12:04:10 +0900 |
commit | 35787a3d06875648dcc536d540f8fbfc818d809f (patch) | |
tree | ca2cb87c3675f614f852c053d67c29e21a7292e8 /actionview/lib | |
parent | 242d7e1e039dd36e9868f13824cb6770a9d01076 (diff) | |
download | rails-35787a3d06875648dcc536d540f8fbfc818d809f.tar.gz rails-35787a3d06875648dcc536d540f8fbfc818d809f.tar.bz2 rails-35787a3d06875648dcc536d540f8fbfc818d809f.zip |
should explicitly returns nil in else clause
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/asset_url_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/asset_url_helper.rb b/actionview/lib/action_view/helpers/asset_url_helper.rb index c6a5e04aba..a62557c904 100644 --- a/actionview/lib/action_view/helpers/asset_url_helper.rb +++ b/actionview/lib/action_view/helpers/asset_url_helper.rb @@ -237,7 +237,11 @@ module ActionView def compute_asset_extname(source, options = {}) return if options[:extname] == false extname = options[:extname] || ASSET_EXTENSIONS[options[:type]] - extname if extname && File.extname(source) != extname + if extname && File.extname(source) != extname + extname + else + nil + end end # Maps asset types to public directory. |