aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-10-03 21:20:52 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-10-03 21:20:52 +0000
commitf510b09c28c98faa2dc18a12430a1cffe1274bd9 (patch)
treeeea1836c179b8f5e4a7104aa27cbcaffbc23ba1c
parentac419a06559a884c7a5839631be9e062d4498646 (diff)
downloadrails-f510b09c28c98faa2dc18a12430a1cffe1274bd9.tar.gz
rails-f510b09c28c98faa2dc18a12430a1cffe1274bd9.tar.bz2
rails-f510b09c28c98faa2dc18a12430a1cffe1274bd9.zip
Made the documentation about render template/file sane
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2446 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-xactionpack/lib/action_controller/base.rb17
1 files changed, 11 insertions, 6 deletions
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:
# <tt>render_partial(partial_path = default_template_name, object = nil, local_assigns = {})</tt> and
# <tt>render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {})</tt>.
#
- # === 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 <tt>render_file(path, status = 200)</tt>
#