diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2011-01-21 19:10:31 -0500 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-01-25 20:13:56 +0100 |
commit | c1145d9281c8deee2a58a96a32f2e3218a7c28be (patch) | |
tree | fffa0f57e833f49c2de5a60205f70e13b3cf5809 | |
parent | 7927fc2ff77543a0ab151ac1cb3d60318e2dfa68 (diff) | |
download | rails-c1145d9281c8deee2a58a96a32f2e3218a7c28be.tar.gz rails-c1145d9281c8deee2a58a96a32f2e3218a7c28be.tar.bz2 rails-c1145d9281c8deee2a58a96a32f2e3218a7c28be.zip |
If I want to set respond_body to nil then it
should be nil and not [nil]. If anything other
than nil then wrap it in array
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r-- | actionpack/lib/action_controller/metal.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index 329798e84f..3df3c341bb 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -133,7 +133,7 @@ module ActionController end def response_body=(val) - body = val.respond_to?(:each) ? val : [val] + body = val.nil? ? nil : (val.respond_to?(:each) ? val : [val]) super body end |