diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/layout.rb | 1 | ||||
-rwxr-xr-x | actionpack/lib/action_controller/response.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index f27e42ea17..e421f8ed9e 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -249,6 +249,7 @@ module ActionController #:nodoc: erase_render_results add_variables_to_assigns @template.instance_variable_set("@content_for_layout", content_for_layout) + @response.layout = layout render_text(@template.render_file(layout, true), deprecated_status) else render_with_no_layout(options, deprecated_status, &block) diff --git a/actionpack/lib/action_controller/response.rb b/actionpack/lib/action_controller/response.rb index 746d6097be..2bec477647 100755 --- a/actionpack/lib/action_controller/response.rb +++ b/actionpack/lib/action_controller/response.rb @@ -1,7 +1,7 @@ module ActionController class AbstractResponse #:nodoc: DEFAULT_HEADERS = { "Cache-Control" => "no-cache" } - attr_accessor :body, :headers, :session, :cookies, :assigns, :template, :redirected_to, :redirected_to_method_params + attr_accessor :body, :headers, :session, :cookies, :assigns, :template, :redirected_to, :redirected_to_method_params, :layout def initialize @body, @headers, @session, @assigns = "", DEFAULT_HEADERS.merge("cookie" => []), [], [] |