diff options
| author | Azul <azul@leap.se> | 2014-05-05 12:22:52 +0200 |
|---|---|---|
| committer | Azul <azul@leap.se> | 2014-05-19 14:23:25 +0200 |
| commit | 89e9154499f67fd8c63e1098b3e50b317c690dd0 (patch) | |
| tree | 03f80e2d1d7e07fa8049cf9c587a1683a4ccaf70 /config | |
| parent | b9174fdc9d9bd403d9a16650bafc4715e3dbf2d4 (diff) | |
custom error pages for 404 and 500 errors
Diffstat (limited to 'config')
| -rw-r--r-- | config/application.rb | 2 | ||||
| -rw-r--r-- | config/routes.rb | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb index 2c9c55a..1077198 100644 --- a/config/application.rb +++ b/config/application.rb @@ -91,5 +91,7 @@ module LeapWeb ## see initializers/customization.rb ## config.paths['app/views'].unshift "config/customization/views" + + config.exceptions_app = self.routes end end diff --git a/config/routes.rb b/config/routes.rb index 745b97d..f92c704 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,9 @@ LeapWeb::Application.routes.draw do root :to => "home#index" get '(:locale)' => 'home#index', :locale => MATCH_LOCALE, :as => 'home' + match '/404' => 'errors#not_found' + match '/500' => 'errors#server_error' + scope "(:locale)", :locale => MATCH_LOCALE, :controller => 'pages', :action => 'show' do get 'privacy-policy', :as => 'privacy_policy' get 'terms-of-service', :as => 'terms_of_service' |
