gitlab-org--gitlab-foss/app/finders
2018-05-31 14:01:04 +00:00
..
admin
concerns
access_requests_finder.rb
autocomplete_users_finder.rb
branches_finder.rb
clusters_finder.rb
contributed_projects_finder.rb
environments_finder.rb
events_finder.rb
fork_projects_finder.rb
group_descendants_finder.rb Revert "Don't include projects shared as group-descendants" 2018-04-18 17:15:52 +02:00
group_finder.rb
group_members_finder.rb
group_projects_finder.rb Reduce queries in GroupProjectsFinder 2018-05-28 13:52:37 +02:00
groups_finder.rb show only groups an admin is a member of in dashboards/grops 2018-05-01 09:24:21 +00:00
issuable_finder.rb Add created_by_me and assigned_to_me scopes 2018-05-21 09:55:30 +08:00
issues_finder.rb Export assigned issues in iCalendar feed 2018-05-31 14:01:04 +00:00
joined_groups_finder.rb
labels_finder.rb
members_finder.rb
merge_request_target_project_finder.rb
merge_requests_finder.rb Add created_by_me and assigned_to_me scopes 2018-05-21 09:55:30 +08:00
milestones_finder.rb
move_to_project_finder.rb
notes_finder.rb
personal_access_tokens_finder.rb
personal_projects_finder.rb Order UsersController#projects.json by updated_at 2018-05-19 07:19:58 +09:00
pipeline_schedules_finder.rb
pipelines_finder.rb Add sha filter to list pipelines 2018-04-27 11:00:52 +01:00
projects_finder.rb
README.md
runner_jobs_finder.rb
snippets_finder.rb
tags_finder.rb
todos_finder.rb
union_finder.rb
user_recent_events_finder.rb
users_finder.rb Add 2FA filter to users API for admins only 2018-04-23 11:54:45 +03:00

Finders

This type of classes responsible for collection items based on different conditions. To prevent lookup methods in models like this:

class Project
  def issues_for_user_filtered_by(user, filter)
    # A lot of logic not related to project model itself
  end
end

issues = project.issues_for_user_filtered_by(user, params)

Better use this:

issues = IssuesFinder.new(project, user, filter).execute

It will help keep models thiner.