aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/rendering.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller/rendering.rb')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index 1dec3f2c3e..40cac40ba7 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -157,7 +157,8 @@ module AbstractController
options[:_template_name] = options[:file]
end
- name = (options[:_template_name] || action_name).to_s
+ name = (options[:_template_name] || options[:action] || action_name).to_s
+ options[:_prefix] ||= _prefix if (options.keys & [:partial, :file, :template]).empty?
options[:_template] ||= with_template_cache(name) do
find_template(name, { :formats => formats }, options)