Skip to content

Commit

Permalink
r3063@asus: jeremy | 2005-11-13 16:13:51 -0800
Browse files Browse the repository at this point in the history
 Apply [3015] to stable.  Update documentation for render :file.  Closes #2858.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3016 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Nov 14, 2005
1 parent 364f6d6 commit e01febb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Update documentation for render :file. #2858 [Tom Werner]

* Only include builtin filters whose filenames match /^[a-z][a-z_]*_helper.rb$/ to avoid including operating system metadata such as ._foo_helper.rb. #2855 [court3nay@gmail.com]

* options_for_select allows any objects which respond_to? :first and :last rather than restricting to Array and Range. #2824 [Jacob Robbins <jrobbins@cmj.com>, Jeremy Kemper]
Expand Down
20 changes: 12 additions & 8 deletions actionpack/lib/action_controller/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ def controller_name
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
#
Expand Down Expand Up @@ -521,14 +520,19 @@ def controller_name
#
# === 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>
#
Expand Down

0 comments on commit e01febb

Please sign in to comment.