aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render/rendering.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-03-08 23:13:24 +0100
committerJosé Valim <jose.valim@gmail.com>2010-03-08 23:25:16 +0100
commit8f082ff4217175f52234f2223658619a9c923afc (patch)
tree10b106df434109c5b5a117a06239a86be8266053 /actionpack/lib/action_view/render/rendering.rb
parent01f0e47663bbbc593af0c36d4cf49124b200e3d8 (diff)
downloadrails-8f082ff4217175f52234f2223658619a9c923afc.tar.gz
rails-8f082ff4217175f52234f2223658619a9c923afc.tar.bz2
rails-8f082ff4217175f52234f2223658619a9c923afc.zip
Clean LookupContext API.
Diffstat (limited to 'actionpack/lib/action_view/render/rendering.rb')
-rw-r--r--actionpack/lib/action_view/render/rendering.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/render/rendering.rb b/actionpack/lib/action_view/render/rendering.rb
index 0322d4b641..47ea70f5ad 100644
--- a/actionpack/lib/action_view/render/rendering.rb
+++ b/actionpack/lib/action_view/render/rendering.rb
@@ -29,8 +29,6 @@ module ActionView
end
# This is the API to render a ViewContext's template from a controller.
- # TODO Review this name since it does not render only templates, but also
- # partials, files and so forth.
def render_template(options, &block)
_evaluate_assigns_and_ivars
@@ -62,12 +60,12 @@ module ActionView
Template.new(options[:inline], "inline template", handler, {})
elsif options.key?(:text)
Template::Text.new(options[:text], self.formats.try(:first))
- elsif options.key?(:file)
- with_fallbacks { find_template(options[:file], options[:_prefix]) }
elsif options.key?(:_template)
options[:_template]
+ elsif options.key?(:file)
+ with_fallbacks { find(options[:file], options[:prefix]) }
elsif options.key?(:template)
- find_template(options[:template], options[:_prefix])
+ find(options[:template], options[:prefix])
end
end