aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2016-01-12 14:22:02 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2016-01-12 14:22:02 -0800
commitdd731446587d6b97fbe0bcd73e226952d549f5ba (patch)
tree362a6fd4e8e6cef6a0f5b93dfa7e5f7238ed45ba /actionpack/lib
parent04d61612f9fdc7f80202cd7d68c58900d8f40ab3 (diff)
downloadrails-dd731446587d6b97fbe0bcd73e226952d549f5ba.tar.gz
rails-dd731446587d6b97fbe0bcd73e226952d549f5ba.tar.bz2
rails-dd731446587d6b97fbe0bcd73e226952d549f5ba.zip
remove `present?` calls
Empty strings / data structures should be treated differently than nils. We don't really need these calls here (don't pass in blank strings).
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/test_case.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 81c7dfa3b2..b43bb9dc17 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -459,16 +459,16 @@ module ActionController
parameters = nil
end
- if parameters.present? || session.present? || flash.present?
+ if parameters || session || flash
non_kwarg_request_warning
end
end
- if body.present?
+ if body
@request.set_header 'RAW_POST_DATA', body
end
- if http_method.present?
+ if http_method
http_method = http_method.to_s.upcase
else
http_method = "GET"
@@ -476,7 +476,7 @@ module ActionController
parameters ||= {}
- if format.present?
+ if format
parameters[:format] = format
end