提交 dd731446 编写于 作者: A Aaron Patterson

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).
上级 04d61612
...@@ -459,16 +459,16 @@ def process(action, *args) ...@@ -459,16 +459,16 @@ def process(action, *args)
parameters = nil parameters = nil
end end
if parameters.present? || session.present? || flash.present? if parameters || session || flash
non_kwarg_request_warning non_kwarg_request_warning
end end
end end
if body.present? if body
@request.set_header 'RAW_POST_DATA', body @request.set_header 'RAW_POST_DATA', body
end end
if http_method.present? if http_method
http_method = http_method.to_s.upcase http_method = http_method.to_s.upcase
else else
http_method = "GET" http_method = "GET"
...@@ -476,7 +476,7 @@ def process(action, *args) ...@@ -476,7 +476,7 @@ def process(action, *args)
parameters ||= {} parameters ||= {}
if format.present? if format
parameters[:format] = format parameters[:format] = format
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册