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
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-21 18:25:00 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-03-21 18:25:00 +0300
commit1974691bfe372f805a635319a8f7dbd6e0537485 (patch)
treebd4bf0c17f74e6b12c1859f0b87dc76a545c7222 /app/helpers/todos_helper.rb
parentdb8f52d4014b489eb11c8408db262a9329c8800d (diff)
Revert "Merge branch '29534-todos-performance' into 'master'"
This reverts merge request !10076
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r--app/helpers/todos_helper.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index 847a8fdfca6..4f5adf623f2 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -39,13 +39,9 @@ module TodosHelper
namespace_project_commit_path(todo.project.namespace.becomes(Namespace), todo.project,
todo.target, anchor: anchor)
else
- if todo.build_failed?
- # associated namespace and route would be loaded from the db again if todo.project was used
- project = todo.target.project
- path = [:pipelines, project.namespace.becomes(Namespace), project, todo.target]
- else
- path = [todo.target]
- end
+ path = [todo.project.namespace.becomes(Namespace), todo.project, todo.target]
+
+ path.unshift(:pipelines) if todo.build_failed?
polymorphic_path(path, anchor: anchor)
end