diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-06-25 11:05:38 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-06-25 11:05:38 +0200 |
commit | 0e8b4e1170c7da6c83949cd6d495c288c3af1089 (patch) | |
tree | 5a43117da9560badf690b7f532bea00e607d5f0f /actionpack/lib/action_dispatch | |
parent | 17c1c9f1cb84fef35f10e0a9bd52df9b5b340901 (diff) | |
download | rails-0e8b4e1170c7da6c83949cd6d495c288c3af1089.tar.gz rails-0e8b4e1170c7da6c83949cd6d495c288c3af1089.tar.bz2 rails-0e8b4e1170c7da6c83949cd6d495c288c3af1089.zip |
Simplify `as` passed check.
`if !var.nil?` is the same as just `if var`
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 4f21403a90..7ebce95b29 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -336,7 +336,7 @@ module ActionDispatch end path = request_encoder.append_format_to location.path path = location.query ? "#{path}?#{location.query}" : path - elsif !as.nil? + elsif as location = URI.parse(path) path = request_encoder.append_format_to location.path path = location.query ? "#{path}?#{location.query}" : path |