debian-mirror-gitlab/app/finders
2014-09-02 14:37:02 +02:00
..
base_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
groups_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
issues_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
merge_requests_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
notes_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
projects_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
README.md Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00
trending_projects_finder.rb Imported Upstream version 7.2.1 2014-09-02 14:37:02 +02:00

Finders

This type of classes responsible for collectiong 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