diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-09-03 00:18:30 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-09-03 00:18:30 +0000 |
commit | f81dae3fca46c43d1fb6e4cb40734ef35623a72e (patch) | |
tree | 987017ae80580ee8f39c877a8f91c8b42eae14c5 /actionpack/lib/action_controller/layout.rb | |
parent | 6246fad19a5ec747f5914c142b8631af212d47ea (diff) | |
download | rails-f81dae3fca46c43d1fb6e4cb40734ef35623a72e.tar.gz rails-f81dae3fca46c43d1fb6e4cb40734ef35623a72e.tar.bz2 rails-f81dae3fca46c43d1fb6e4cb40734ef35623a72e.zip |
Remove deprecated functionality from actionpack. Closes #8958 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/layout.rb')
-rw-r--r-- | actionpack/lib/action_controller/layout.rb | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb index 027ae42aeb..ff4a4057a2 100644 --- a/actionpack/lib/action_controller/layout.rb +++ b/actionpack/lib/action_controller/layout.rb @@ -233,29 +233,23 @@ module ActionController #:nodoc: end protected - def render_with_a_layout(options = nil, deprecated_status = nil, deprecated_layout = nil, &block) #:nodoc: + def render_with_a_layout(options = nil, &block) #:nodoc: template_with_options = options.is_a?(Hash) - if apply_layout?(template_with_options, options) && (layout = pick_layout(template_with_options, options, deprecated_layout)) + if apply_layout?(template_with_options, options) && (layout = pick_layout(template_with_options, options)) assert_existence_of_template_file(layout) options = options.merge :layout => false if template_with_options logger.info("Rendering template within #{layout}") if logger - if template_with_options - content_for_layout = render_with_no_layout(options, &block) - deprecated_status = options[:status] || deprecated_status - else - content_for_layout = render_with_no_layout(options, deprecated_status, &block) - end - + content_for_layout = render_with_no_layout(options, &block) 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) + render_for_text(@template.render_file(layout, true)) else - render_with_no_layout(options, deprecated_status, &block) + render_with_no_layout(options, &block) end end @@ -272,10 +266,8 @@ module ActionController #:nodoc: !template_exempt_from_layout?(default_template_name(options[:action] || options[:template])) end - def pick_layout(template_with_options, options, deprecated_layout) - if deprecated_layout - deprecated_layout - elsif template_with_options + def pick_layout(template_with_options, options) + if template_with_options case layout = options[:layout] when FalseClass nil |