diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-07-05 02:18:34 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-07-05 02:18:34 +0000 |
commit | 40f50fd7e5b977c471e819dac5164892aa6abffe (patch) | |
tree | a8ad3f264009c1e780e888348a1bcd5420370fe2 /actionpack/lib | |
parent | ead99f3f2e7085688b7d31b2cf2af9aecc1a1982 (diff) | |
download | rails-40f50fd7e5b977c471e819dac5164892aa6abffe.tar.gz rails-40f50fd7e5b977c471e819dac5164892aa6abffe.tar.bz2 rails-40f50fd7e5b977c471e819dac5164892aa6abffe.zip |
Doc fix (closes #5429)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 38a255192e..e7fd6d8968 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -597,6 +597,13 @@ module ActionController #:nodoc: # # placed in "app/views/layouts/special.r(html|xml)" # render :text => "Explosion!", :layout => "special" # + # The :text option can also accept a Proc object, which can be used to manually control the page generation. This should + # generally be avoided, as it violates the separation between code and content, and because almost everything that can be + # done with this method can also be done more cleanly using one of the other rendering methods, most notably templates. + # + # # Renders "Hello from code!" + # render :text => proc { |response, output| output.write("Hello from code!") } + # # _Deprecation_ _notice_: This used to have the signature <tt>render_text("text", status = 200)</tt> # # === Rendering an inline template |