aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-08 03:12:03 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-08 03:12:03 +0000
commitf1b12b62f48257054a416269f3bf465fb4a8d6e7 (patch)
tree79fc7957ea92577c4a308c3c8d600152fe657fb8 /actionpack/lib
parent32553a2d76f4520e1456d5463c691310c22ebd2b (diff)
downloadrails-f1b12b62f48257054a416269f3bf465fb4a8d6e7.tar.gz
rails-f1b12b62f48257054a416269f3bf465fb4a8d6e7.tar.bz2
rails-f1b12b62f48257054a416269f3bf465fb4a8d6e7.zip
Fix layout overriding response status. Closes #9476.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7418 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/layout.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb
index ff4a4057a2..5655a9bd0b 100644
--- a/actionpack/lib/action_controller/layout.rb
+++ b/actionpack/lib/action_controller/layout.rb
@@ -247,7 +247,8 @@ module ActionController #:nodoc:
add_variables_to_assigns
@template.instance_variable_set("@content_for_layout", content_for_layout)
response.layout = layout
- render_for_text(@template.render_file(layout, true))
+ status = template_with_options ? options[:status] : nil
+ render_for_text(@template.render_file(layout, true), status)
else
render_with_no_layout(options, &block)
end