From f510b09c28c98faa2dc18a12430a1cffe1274bd9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 3 Oct 2005 21:20:52 +0000 Subject: Made the documentation about render template/file sane git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2446 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 27163f4ed7..cc13bfef14 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -503,19 +503,24 @@ module ActionController #:nodoc: # render_partial(partial_path = default_template_name, object = nil, local_assigns = {}) and # render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {}). # - # === Rendering a file + # === Rendering a template # - # File rendering works just like action rendering except that it takes a path relative to the template root or an absolute - # path if use_full_path is passed as true. The current layout is not applied automatically. + # Template rendering works just like action rendering except that it takes a path relative to the template root. + # The current layout is automatically applied. # # # Renders the template located in [TEMPLATE_ROOT]/weblog/show.r(html|xml) (in Rails, app/views/weblog/show.rhtml) - # render :file => "weblog/show" + # render :template => "weblog/show" + # + # === Rendering a file + # + # File rendering works just like action rendering except that it takes an absolute path. + # The current layout is not applied automatically. # # # Renders the template located in /path/to/some/template.r(html|xml) - # render :file => "/path/to/some/template", :use_full_path => false + # render :file => "/path/to/some/template" # # # Renders the same template within the current layout, but with a 404 status code - # render :file => "/path/to/some/template", :use_full_path => false, :layout => true, :status => 404 + # render :file => "/path/to/some/template", :layout => true, :status => 404 # # _Deprecation_ _notice_: This used to have the signature render_file(path, status = 200) # -- cgit v1.2.3