From c1145d9281c8deee2a58a96a32f2e3218a7c28be Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Fri, 21 Jan 2011 19:10:31 -0500 Subject: 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/lib/action_controller/metal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib') 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 -- cgit v1.2.3