Permalink
Browse files

use new #head method

git-svn-id: http://svn.techno-weenie.net/projects/plugins/exception_logger@2504 567b1171-46fb-0310-a4c9-b4bef9110e78
  • Loading branch information...
1 parent cf239a5 commit 30f43993d5ade0cbf8631153c8a475bc4e71ed6f technoweenie committed Nov 24, 2006
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/exception_loggable.rb
View
@@ -54,16 +54,16 @@ def local_request?
end
def render_404(exception)
- respond_to do |type|
- type.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => "404 Not Found" }
- type.all { render :nothing => true, :status => "404 Not Found" }
+ respond_to do |format|
+ format.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => 400 }
+ format.all { head :status => 404 }
end
end
def render_500(exception)
- respond_to do |type|
- type.html { render :file => "#{RAILS_ROOT}/public/500.html", :status => "500 Error" }
- type.all { render :nothing => true, :status => "500 Error" }
+ respond_to do |format|
+ format.html { render :file => "#{RAILS_ROOT}/public/500.html", :status => 500 }
+ format.all { head :status => 500 }
end
end

0 comments on commit 30f4399

Please sign in to comment.