mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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).
This commit is contained in:
parent
04d61612f9
commit
dd73144658
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue