aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb2
-rw-r--r--actionpack/lib/abstract_controller/view_paths.rb7
2 files changed, 6 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index 77c554fa3f..5048754e33 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -97,7 +97,7 @@ module AbstractController
end
if (options.keys & [:partial, :file, :template]).empty?
- options[:_prefix] ||= _prefix
+ options[:prefix] ||= _prefix
end
options[:template] ||= (options[:action] || action_name).to_s
diff --git a/actionpack/lib/abstract_controller/view_paths.rb b/actionpack/lib/abstract_controller/view_paths.rb
index ec8f31cdfe..6513c0778e 100644
--- a/actionpack/lib/abstract_controller/view_paths.rb
+++ b/actionpack/lib/abstract_controller/view_paths.rb
@@ -7,8 +7,7 @@ module AbstractController
self._view_paths = ActionView::PathSet.new
end
- delegate :find_template, :template_exists?,
- :view_paths, :formats, :formats=, :to => :lookup_context
+ delegate :template_exists?, :view_paths, :formats, :formats=, :to => :lookup_context
# LookupContext is the object responsible to hold all information required to lookup
# templates, i.e. view paths and details. Check ActionView::LookupContext for more
@@ -29,6 +28,10 @@ module AbstractController
lookup_context.view_paths.unshift(*path)
end
+ def template_exists?(*args)
+ lookup_context.exists?(*args)
+ end
+
module ClassMethods
# Append a path to the list of view paths for this controller.
#