mirror of https://github.com/rails/rails
Be more explicit when wrapping in an enumerable body.
This commit is contained in:
parent
36e2cb9abb
commit
28c8e2229f
|
@ -186,9 +186,8 @@ module ActionController
|
|||
end
|
||||
|
||||
def response_body=(body)
|
||||
body = [body] unless body.nil? || body.respond_to?(:each) || body.respond_to?(:call)
|
||||
|
||||
if body
|
||||
body = [body] if body.is_a?(String)
|
||||
response.body = body
|
||||
super
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue