Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 30f43993d5ade0cbf8631153c8a475bc4e71ed6f 1 parent cf239a5
technoweenie authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/exception_loggable.rb
View
12 lib/exception_loggable.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.