Permalink
Browse files

Stringify rendered text unless it's a Proc object for streaming.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Apr 24, 2007
1 parent 38d574c commit 339a58a266c3514921ac6d2ff60de8aa5e30fb5c
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/base.rb
@@ -869,7 +869,7 @@ def render_text(text = nil, status = nil, append_response = false) #:nodoc:
response.body ||= ''
response.body << text.to_s
else
- response.body = text.to_s
+ response.body = text.is_a?(Proc) ? text : text.to_s
end
end

0 comments on commit 339a58a

Please sign in to comment.