Commit Graph

17 Commits

Author SHA1 Message Date
Jarka Košanová b1c3955385 Rename GroupHierarchy into ObjectHierarchy
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
  - move it to a concern
2018-12-19 15:24:29 +01:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Bob Van Landuyt de35c044fb Preload ancestors after pagination when filtering
We need to preload the ancestors of search results after applying
pagination limits. This way the search results itself are paginated,
but not the ancestors.

If we don't do this, we might not preload a parent group of a search
result as it has been cut off by pagination.
2018-07-06 14:09:36 +02:00
blackst0ne 3d3b46f344 [Rails5] Rename `sort` methods to `sort_by_attribute` 2018-04-04 09:19:47 +00:00
Bob Van Landuyt c56326fc3e Fix filter on `dashboard/groups` & `explore/groups
When searching we would limit the scope of ancestors to load because
the filter would be applied to the ancestors. Instead, we need to load
_all_ ancestors for matching projects.
2018-01-22 17:02:04 +01:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Lin Jen-Shin 07d3d44775 Move ModuleWithInstanceVariables to Gitlab namespace
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
2017-11-22 17:06:57 +08:00
Lin Jen-Shin 9ac0c76b78 Use StrongMemoize and enable/disable cops properly 2017-11-18 01:01:53 +08:00
Bob Van Landuyt 18907efbc9 Pass `archived:` as a keyword argument 2017-10-12 11:36:54 +02:00
Bob Van Landuyt bd8943f5ad Fix spinach features
And several other failures
2017-10-11 14:16:40 +02:00
Bob Van Landuyt 524f65152f Only expand ancestors when searching
Not all_groups, since that would expose groups the user does not have
access to
2017-10-09 12:02:40 +02:00
Bob Van Landuyt 951abe2b2e Load counts everywhere we render a group tree 2017-10-05 11:11:21 +02:00
Bob Van Landuyt ec8a7a36c0 Make sure all ancestors are loaded when searching groups 2017-10-05 11:10:57 +02:00
Bob Van Landuyt 9870453eee Stylize `GroupTree` concern 2017-10-04 22:49:42 +02:00
Bob Van Landuyt ea4e17e2ae Search subgroups on dashboard and explore views 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 3a4dc55f29 Reuse the groups tree for explore and dashboard. 2017-10-04 22:49:41 +02:00