aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2005-11-14 00:12:46 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2005-11-14 00:12:46 +0000
commit5cd2f3269731c151581fbb4b3a32df18409a84dc (patch)
tree096e69db2260a1ed0999df529cd691358a259035 /actionpack/lib
parentda2d4d6d57ed8f603b81d7446ce19e356c67f1af (diff)
downloadrails-5cd2f3269731c151581fbb4b3a32df18409a84dc.tar.gz
rails-5cd2f3269731c151581fbb4b3a32df18409a84dc.tar.bz2
rails-5cd2f3269731c151581fbb4b3a32df18409a84dc.zip
Update documentation for render :file. References #2858.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3015 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_controller/base.rb20
1 files changed, 12 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index f37448d347..be04012b9f 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -460,8 +460,7 @@ module ActionController #:nodoc:
end
protected
- # Renders the content that'll be returned to the browser as the response body. This can just be as regular text, but is
- # more often the compilation of a template.
+ # Renders the content that will be returned to the browser as the response body.
#
# === Rendering an action
#
@@ -521,14 +520,19 @@ module ActionController #:nodoc:
#
# === Rendering a file
#
- # File rendering works just like action rendering except that it takes an absolute path.
- # The current layout is not applied automatically.
+ # File rendering works just like action rendering except that it takes a filesystem path. By default, the path
+ # is assumed to be absolute, and the current layout is not applied.
#
- # # Renders the template located in /path/to/some/template.r(html|xml)
- # render :file => "/path/to/some/template"
+ # # Renders the template located at the absolute filesystem path
+ # render :file => "/path/to/some/template.rhtml"
+ # render :file => "c:/path/to/some/template.rhtml"
#
- # # Renders the same template within the current layout, but with a 404 status code
- # render :file => "/path/to/some/template", :layout => true, :status => 404
+ # # Renders a template within the current layout, and with a 404 status code
+ # render :file => "/path/to/some/template.rhtml", :layout => true, :status => 404
+ # render :file => "c:/path/to/some/template.rhtml", :layout => true, :status => 404
+ #
+ # # Renders a template relative to the template root and chooses the proper file extension
+ # render :file => "some/template", :use_full_path => true
#
# _Deprecation_ _notice_: This used to have the signature <tt>render_file(path, status = 200)</tt>
#