Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4463 from nashby/refactor-response_body

refactor response_body= method
  • Loading branch information...
commit 1919a303f98619d636f17b7fb736967ffdd35972 2 parents 591fcba + 6f3420c
@josevalim josevalim authored
Showing with 1 addition and 7 deletions.
  1. +1 −7 actionpack/lib/action_controller/metal.rb
View
8 actionpack/lib/action_controller/metal.rb
@@ -182,13 +182,7 @@ def status=(status)
end
def response_body=(val)
- body = if val.is_a?(String)
- [val]
- elsif val.nil? || val.respond_to?(:each)
- val
- else
- [val]
- end
+ body = (val.nil? || val.respond_to?(:each)) ? val : [val]
super body
end
Please sign in to comment.
Something went wrong with that request. Please try again.