Pass along blocks from render_to_string to render
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
06dd1f2ca3
commit
f9937dd041
@ -1,5 +1,7 @@
|
||||
*SVN*
|
||||
|
||||
* Pass along blocks from render_to_string to render. [Sam Stephenson]
|
||||
|
||||
* Add render :update for inline RJS. [Sam Stephenson] Example:
|
||||
class UserController < ApplicationController
|
||||
def refresh
|
||||
|
@ -644,8 +644,8 @@ def render(options = nil, deprecated_status = nil, &block) #:doc:
|
||||
|
||||
# Renders according to the same rules as <tt>render</tt>, but returns the result in a string instead
|
||||
# of sending it as the response body to the browser.
|
||||
def render_to_string(options = nil) #:doc:
|
||||
result = render(options)
|
||||
def render_to_string(options = nil, &block) #:doc:
|
||||
result = render(options, &block)
|
||||
erase_render_results
|
||||
@variables_added = nil
|
||||
@template.instance_variable_set("@assigns_added", nil)
|
||||
|
Loading…
Reference in New Issue
Block a user