aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base.rb
diff options
context:
space:
mode:
authorRyan Bates <ryan@railscasts.com>2008-08-21 21:02:10 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-21 21:03:33 -0500
commit1129a24caff9f1804c2bff6569c0cbd8598dfa86 (patch)
tree14a20c4c8e6e5fd05cad221de2231aefa40b849d /actionpack/lib/action_controller/base.rb
parente6a66cbd056f177f7e60341799aa95791fcfa19d (diff)
downloadrails-1129a24caff9f1804c2bff6569c0cbd8598dfa86.tar.gz
rails-1129a24caff9f1804c2bff6569c0cbd8598dfa86.tar.bz2
rails-1129a24caff9f1804c2bff6569c0cbd8598dfa86.zip
Cleanup around partial rendering
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rw-r--r--actionpack/lib/action_controller/base.rb20
1 files changed, 3 insertions, 17 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 082f09ff16..5887e1e3b4 100644
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -780,9 +780,6 @@ module ActionController #:nodoc:
# render :file => "/path/to/some/template.erb", :layout => true, :status => 404
# render :file => "c:/path/to/some/template.erb", :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
- #
# === Rendering text
#
# Rendering of text is usually used for tests or for rendering prepared content, such as a cache. By default, text
@@ -913,21 +910,10 @@ module ActionController #:nodoc:
response.content_type ||= Mime::JSON
render_for_text(json, options[:status])
- elsif partial = options[:partial]
- partial = default_template_name if partial == true
+ elsif options[:partial]
+ options[:partial] = default_template_name if options[:partial] == true
add_variables_to_assigns
-
- if collection = options[:collection]
- render_for_text(
- @template.send!(:render_partial_collection, partial, collection,
- options[:spacer_template], options[:locals], options[:as]), options[:status]
- )
- else
- render_for_text(
- @template.send!(:render_partial, partial,
- options[:object], options[:locals]), options[:status]
- )
- end
+ render_for_text(@template.render(options), options[:status])
elsif options[:update]
add_variables_to_assigns