f77fda6437
In various places we check if the same relation would return projects. This is done using "any?" which will run a COUNT query with any LIMIT/OFFSET values still applied. To work around all this we introduce 2 helper methods that take care of doing the right thing. This leads to the produced queries being simpler and fewer queries being executed.
6 lines
421 B
Text
6 lines
421 B
Text
- if any_projects?(@projects)
|
|
.project-item-select-holder
|
|
= project_select_tag :project_path, class: "project-item-select", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at', relative_path: local_assigns[:path] }, with_feature_enabled: local_assigns[:with_feature_enabled]
|
|
%a.btn.btn-new.new-project-item-select-button
|
|
= local_assigns[:label]
|
|
= icon('caret-down')
|