Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
Set exceptions_app to run through our own routes when errors occur.
Browse files Browse the repository at this point in the history
fixes #45
  • Loading branch information
mchung committed Dec 13, 2012
1 parent d7b333e commit 8312352
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,9 @@ class Application < Rails::Application

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

# In Rails 3.2, exception handling is done within the Rack middleware stack.
# Configure this application to run through the routes anytime an error occurs.
config.exceptions_app = self.routes
end
end
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@

match '/about' => 'high_voltage/pages#show', :id => 'about'

match '/404' => 'application#render_404_error'
match '/500' => redirect("/error")
end

0 comments on commit 8312352

Please sign in to comment.