diff options
author | azul <azul@riseup.net> | 2017-03-23 09:03:25 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-03-23 09:03:25 +0000 |
commit | 96c3123b9a30df3d7750b1f8e4bda2aba3d1fcb7 (patch) | |
tree | f16e3d9f830cef89d523ef2da66fd27bb2afd426 /config | |
parent | 3efe125d6e3bd5f4eecd18952376ffc37e09b9c5 (diff) | |
parent | 1e672227a23afbb9f319a0aefa0b0ca3495fa1c6 (diff) |
Merge branch 'bugfix/handle-couch-conflicts' into 'master'
bugfix: handle couch 404s
See merge request !26
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb index 0e00356..d8e4c82 100644 --- a/config/application.rb +++ b/config/application.rb @@ -22,6 +22,7 @@ APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file| module LeapWeb class Application < Rails::Application + # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. @@ -53,7 +54,14 @@ module LeapWeb end config.paths['app/views'].unshift custom_view_path + + config.action_dispatch.rescue_responses.merge!( + 'CouchRest::Model::DocumentNotFound' => :not_found, + 'CouchRest::NotFound' => :not_found + ) + # handle http errors ourselves config.exceptions_app = self.routes + end end |