diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-21 17:50:57 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-21 17:50:57 +0000 |
commit | 7159402c6d0edab20ff84a686bcd03894b4e9c4c (patch) | |
tree | 484b84ba391bfce24c63ada3dd2dbfd27b617984 | |
parent | 194fc9de5d0d0838e456c9a01cdb14f716fb92d9 (diff) | |
download | rails-7159402c6d0edab20ff84a686bcd03894b4e9c4c.tar.gz rails-7159402c6d0edab20ff84a686bcd03894b4e9c4c.tar.bz2 rails-7159402c6d0edab20ff84a686bcd03894b4e9c4c.zip |
Fixed use of an integer as return code for renders, so render_text "hello world", 404 now works #1327
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/CHANGELOG | 2 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 924017f0d0..ec06c28ed1 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed use of an integer as return code for renders, so render_text "hello world", 404 now works #1327 + * Fixed assert_redirect_to to work with redirect_to_path #869 [Nicholas Seckar] * Fixed escaping of :method option in remote_form_tag #1218 [Rick Olson] diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 416388dfa7..160318c98b 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -478,7 +478,7 @@ module ActionController #:nodoc: def render_text(text = nil, status = nil, &block) #:doc: return if performed? add_variables_to_assigns - @response.headers["Status"] = status || DEFAULT_RENDER_STATUS_CODE + @response.headers["Status"] = status.to_s || DEFAULT_RENDER_STATUS_CODE @response.body = block_given? ? block : text @performed_render = true end |