aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-06-25 11:05:38 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-06-25 11:05:38 +0200
commit0e8b4e1170c7da6c83949cd6d495c288c3af1089 (patch)
tree5a43117da9560badf690b7f532bea00e607d5f0f /actionpack/lib/action_dispatch
parent17c1c9f1cb84fef35f10e0a9bd52df9b5b340901 (diff)
downloadrails-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.rb2
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