diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-07-01 22:33:39 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2016-07-01 22:33:39 +0200 |
commit | ea40ec56ba9bb44c91ffd8b621718faf960f340d (patch) | |
tree | 85dddfde4d27f0100666ca5afe5dfa17961fe825 /actionpack | |
parent | 7f0d415eb7ea058d70ffb9e77510727f4bbd2c7e (diff) | |
download | rails-ea40ec56ba9bb44c91ffd8b621718faf960f340d.tar.gz rails-ea40ec56ba9bb44c91ffd8b621718faf960f340d.tar.bz2 rails-ea40ec56ba9bb44c91ffd8b621718faf960f340d.zip |
Make mutation stand out some more.
Felt that += overwriting the path variable was a little too hidden.
Make the outcomes easier to spot with an if-else branch.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index ecd02b8c2e..a7805edaa2 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -423,8 +423,11 @@ module ActionDispatch end def append_format_to(path) - path += @path_format unless @url_encoded_form - path + if @url_encoded_form + path + @path_format + else + path + end end def content_type |