aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/response.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-08-25 12:14:31 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-08-25 12:14:31 -0700
commitc7ba911a43e513bd1adbee93f16d2b8efea7cc88 (patch)
tree0a3f88da172575fb9d85980975cbbe41ed6bd53c /actionpack/lib/action_dispatch/http/response.rb
parent09fde6440a729e169e51c04f7caf0d19fe949c1d (diff)
downloadrails-c7ba911a43e513bd1adbee93f16d2b8efea7cc88.tar.gz
rails-c7ba911a43e513bd1adbee93f16d2b8efea7cc88.tar.bz2
rails-c7ba911a43e513bd1adbee93f16d2b8efea7cc88.zip
ActionController::Metal can be a middleware
Diffstat (limited to 'actionpack/lib/action_dispatch/http/response.rb')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb
index 055f29a972..e457450059 100644
--- a/actionpack/lib/action_dispatch/http/response.rb
+++ b/actionpack/lib/action_dispatch/http/response.rb
@@ -161,13 +161,16 @@ module ActionDispatch # :nodoc:
headers[CONTENT_TYPE] = type
end
- def prepare!
+ def to_a
assign_default_content_type_and_charset!
handle_conditional_get!
self["Set-Cookie"] = @cookie.join("\n")
self["ETag"] = @etag if @etag
+ super
end
+ alias prepare! to_a
+
def each(&callback)
if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) }