Permalink
Browse files

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
  • Loading branch information...
1 parent 06dd1f2 commit f9937dd04149e62fb834c815c60c5a96c025b240 @sstephenson sstephenson committed Jan 20, 2006
Showing with 4 additions and 2 deletions.
  1. +2 −0 actionpack/CHANGELOG
  2. +2 −2 actionpack/lib/action_controller/base.rb
View
@@ -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)

0 comments on commit f9937dd

Please sign in to comment.