aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-09-22 15:37:38 +0200
committerJosé Valim <jose.valim@gmail.com>2011-09-22 15:37:38 +0200
commit43d27e9105b385f64ec195f60d10ab3d64281bd4 (patch)
tree755829e527a141ba5aa7db852ec16b3cd9cd073a /actionpack/lib/action_dispatch
parentc3fa2e9bf89039e90c45336979d17cb0c02a6cd2 (diff)
downloadrails-43d27e9105b385f64ec195f60d10ab3d64281bd4.tar.gz
rails-43d27e9105b385f64ec195f60d10ab3d64281bd4.tar.bz2
rails-43d27e9105b385f64ec195f60d10ab3d64281bd4.zip
Deprecate passing the template handler in the template name.
For example, calling hello.erb is now deprecated. Since Rails 3.0 passing the handler had no effect whatsover. This commit simply deprecates such cases so we can clean up the code in later releases.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/middleware/show_exceptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
index a765c23dae..2fa68c64c5 100644
--- a/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
+++ b/actionpack/lib/action_dispatch/middleware/show_exceptions.rb
@@ -86,8 +86,8 @@ module ActionDispatch
:framework_trace => framework_trace(exception),
:full_trace => full_trace(exception)
)
- file = "rescues/#{@@rescue_templates[exception.class.name]}.erb"
- body = template.render(:file => file, :layout => 'rescues/layout.erb')
+ file = "rescues/#{@@rescue_templates[exception.class.name]}"
+ body = template.render(:template => file, :layout => 'rescues/layout')
render(status_code(exception), body)
end