aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/render')
-rw-r--r--actionpack/lib/action_view/render/layouts.rb4
-rw-r--r--actionpack/lib/action_view/render/partials.rb2
-rw-r--r--actionpack/lib/action_view/render/rendering.rb8
3 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/render/layouts.rb b/actionpack/lib/action_view/render/layouts.rb
index 91a92a833a..8688de3d18 100644
--- a/actionpack/lib/action_view/render/layouts.rb
+++ b/actionpack/lib/action_view/render/layouts.rb
@@ -49,10 +49,10 @@ module ActionView
def _find_layout(layout) #:nodoc:
begin
layout =~ /^\// ?
- with_fallbacks { find_template(layout) } : find_template(layout)
+ with_fallbacks { find(layout) } : find(layout)
rescue ActionView::MissingTemplate => e
update_details(:formats => nil) do
- raise unless template_exists?(layout)
+ raise unless exists?(layout)
end
end
end
diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb
index 0fe2d560f7..950c9d2cd8 100644
--- a/actionpack/lib/action_view/render/partials.rb
+++ b/actionpack/lib/action_view/render/partials.rb
@@ -294,7 +294,7 @@ module ActionView
def find_template(path=@path)
return path unless path.is_a?(String)
prefix = @view.controller_path unless path.include?(?/)
- @view.find_template(path, prefix, true)
+ @view.find(path, prefix, true)
end
def partial_path(object = @object)
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