Redirect to the error page for non-existent issues

This commit is contained in:
Tom Hughes 2020-04-22 12:22:34 +01:00
parent 1cb92c9d2a
commit 359d76c8f0
2 changed files with 9 additions and 9 deletions

View file

@ -82,6 +82,6 @@ class IssuesController < ApplicationController
def find_issue
@issue = Issue.visible_to(current_user).find(params[:id])
rescue ActiveRecord::RecordNotFound
head :not_found
redirect_to :controller => "errors", :action => "not_found"
end
end