Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-10 15:49:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-05-10 15:49:19 +0300
commit09c2aab4aa4661b147545e2c41b6a0100fc57b11 (patch)
tree4bb96866aa41146dda70b78efc0cd0e06e1a5dbd /app
parent3a983b10cc44944b4455d4ce9ae23de8c7e7d6db (diff)
parentd257110e336ae01a7c808246027a0676133dc80f (diff)
Merge branch '20517-delete-projects-issuescontroller-redirect_old' into 'master'
Resolve "Delete `Projects::IssuesController#redirect_old`" Closes #20517 See merge request !11135
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/issues_controller.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index bcd23d61519..58d41e0478d 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -227,7 +227,7 @@ class Projects::IssuesController < Projects::ApplicationController
def issue
# The Sortable default scope causes performance issues when used with find_by
- @noteable = @issue ||= @project.issues.where(iid: params[:id]).reorder(nil).take || redirect_old
+ @noteable = @issue ||= @project.issues.where(iid: params[:id]).reorder(nil).take!
end
alias_method :subscribable_resource, :issue
alias_method :issuable, :issue
@@ -266,21 +266,6 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
- # Since iids are implemented only in 6.1
- # user may navigate to issue page using old global ids.
- #
- # To prevent 404 errors we provide a redirect to correct iids until 7.0 release
- #
- def redirect_old
- issue = @project.issues.find_by(id: params[:id])
-
- if issue
- redirect_to issue_path(issue)
- else
- raise ActiveRecord::RecordNotFound.new
- end
- end
-
def issue_params
params.require(:issue).permit(
:title, :assignee_id, :position, :description, :confidential,