diff options
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index e75df4c127..688ab7e174 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -476,6 +476,16 @@ module ActionController #:nodoc: add_variables_to_assigns @template.render_file(template_name) end + + def render_partial(partial_path, object = nil, local_assigns = {}) #:doc: + add_variables_to_assigns + render_text(@template.render_partial(partial_path, object, local_assigns)) + end + + def render_partial_collection(partial_name, collection, partial_spacer_template = nil, local_assigns = {})#:doc: + add_variables_to_assigns + render_text(@template.render_collection_of_partials(partial_name, collection, partial_spacer_template, local_assigns)) + end # Sends the file by streaming it 4096 bytes at a time. This way the # whole file doesn't need to be read into memory at once. This makes |