debian-mirror-gitlab/app/finders
2015-04-26 09:18:37 +02:00
..
groups_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
issuable_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
issues_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
merge_requests_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
notes_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
projects_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
README.md Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
snippets_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02:00
trending_projects_finder.rb Imported Upstream version 7.10.0 2015-04-26 09:18:37 +02: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.execute(project, user, filter)

It will help keep models thiner.