diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-07-02 18:09:49 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-07-25 17:41:29 +0300 |
commit | 7a233b37cd1281698107f1f3236b425bf4cc5ae7 (patch) | |
tree | 5e73c37e2294488c31e148b40bb5f49cd0a507a8 /app/finders | |
parent | 995588ad627e9c97c1ebb1124a8c24d2fd117313 (diff) |
Remove code for dynamically generating routes
This adds a database migration that creates routes for any projects and
namespaces that don't already have one. We also remove the runtime code
for dynamically creating routes, as this is no longer necessary.
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/admin/projects_finder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb index 53b77f5fed9..543bf1a1415 100644 --- a/app/finders/admin/projects_finder.rb +++ b/app/finders/admin/projects_finder.rb @@ -7,7 +7,7 @@ class Admin::ProjectsFinder end def execute - items = Project.without_deleted.with_statistics + items = Project.without_deleted.with_statistics.with_route items = by_namespace_id(items) items = by_visibilty_level(items) items = by_with_push(items) @@ -16,7 +16,7 @@ class Admin::ProjectsFinder items = by_archived(items) items = by_personal(items) items = by_name(items) - items = items.includes(namespace: [:owner]) + items = items.includes(namespace: [:owner, :route]) sort(items).page(params[:page]) end |