diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-15 00:11:19 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-15 00:36:22 +0300 |
commit | 2b9a25bd5a69c3c6a5bb24bb67838a4d354204e1 (patch) | |
tree | 044c12f4bb1585096dd55f11007a1a0400462dee /app/controllers | |
parent | 5e9a394440f806302a34bb092e3b46d19430dccc (diff) | |
download | gitlab-ce-2b9a25bd5a69c3c6a5bb24bb67838a4d354204e1.tar.gz |
Handle unmatched routing with not_found method
We need this to prevent routing error when user access URL like /123
when there is no resource located under such name
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index b3455e04c29..705824502eb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -45,6 +45,10 @@ class ApplicationController < ActionController::Base redirect_to request.referer.present? ? :back : default, options end + def not_found + render_404 + end + protected # This filter handles both private tokens and personal access tokens |