gitlab-org--gitlab-foss/spec/finders
Yorick Peterse 38b8ae641f
Clean up ActiveRecord code in TodoService
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.

One particular noteworthy line in TodoService is the following:

    todos_ids = todos.update_state(state)

Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.

Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
2018-10-08 15:19:12 +02:00
..
admin add type filter to admin runners page 2018-09-24 16:04:10 +02:00
autocomplete Refactor AutocompleteController 2018-08-20 13:53:00 +02:00
concerns Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
access_requests_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
awarded_emoji_finder_spec.rb Refactor AutocompleteController 2018-08-20 13:53:00 +02:00
branches_finder_spec.rb Add case insensitive branches search 2017-10-23 06:37:25 +03:00
clusters_finder_spec.rb Rearrange DeploymentPlatform methods 2018-03-22 14:52:33 -06:00
contributed_projects_finder_spec.rb Include private contributions in user contribution graph 2018-09-07 15:08:55 +00:00
environments_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
events_finder_spec.rb Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
fork_projects_finder_spec.rb Introduce ForkProjectsFinder class 2017-09-20 08:27:16 +10:00
group_descendants_finder_spec.rb Resolve "Improve handling of projects shared with a group" 2018-09-07 06:09:13 +00:00
group_labels_finder_spec.rb Add subscribe filter to labels page 2018-10-04 10:24:50 +02:00
group_members_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
group_projects_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
groups_finder_spec.rb show only groups an admin is a member of in dashboards/grops 2018-05-01 09:24:21 +00:00
issues_finder_spec.rb Allows to filter issues by Any milestone in the API 2018-10-03 14:19:08 +02:00
joined_groups_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
labels_finder_spec.rb Add subscribe filter to labels page 2018-10-04 10:24:50 +02:00
license_template_finder_spec.rb Backport project template API to CE 2018-10-05 11:34:43 +01:00
members_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
merge_request_target_project_finder_spec.rb Prevent new merge requests for archived projects 2018-04-11 10:51:14 +02:00
merge_requests_finder_spec.rb Allow Gitaly N+1s in MR finder spec 2018-10-04 10:40:16 +01:00
milestones_finder_spec.rb Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
notes_finder_spec.rb Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
pending_todos_finder_spec.rb Clean up ActiveRecord code in TodoService 2018-10-08 15:19:12 +02:00
personal_access_tokens_finder_spec.rb Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
personal_projects_finder_spec.rb Updates from rubocop -a 2018-07-09 21:13:08 +08:00
pipeline_schedules_finder_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
pipelines_finder_spec.rb Add pipeline lists to GraphQL 2018-07-04 10:53:39 +02:00
projects_finder_spec.rb Resolve "500 Internal Server Error: Deleting branch of deleted project" 2018-09-12 20:52:30 +00:00
runner_jobs_finder_spec.rb Refactor validations and make runner factory by default to be instance-wide runner 2018-05-31 10:56:07 +02:00
snippets_finder_spec.rb Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
tags_finder_spec.rb
template_finder_spec.rb Backport project template API to CE 2018-10-05 11:34:43 +01:00
todos_finder_spec.rb Clean up ActiveRecord code in TodoService 2018-10-08 15:19:12 +02:00
user_finder_spec.rb Refactor AutocompleteController 2018-08-20 13:53:00 +02:00
user_recent_events_finder_spec.rb Include private contributions in user contribution graph 2018-09-07 15:08:55 +00:00
users_finder_spec.rb Support custom attributes on users 2017-09-28 16:49:42 +00:00
users_with_pending_todos_finder_spec.rb Clean up ActiveRecord code in TodoService 2018-10-08 15:19:12 +02:00