mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-22 19:16:39 +10:00
# Conflicts: # app/controllers/groups/application_controller.rb # app/services/test_hook_service.rb # app/views/admin/groups/show.html.haml # app/views/groups/_settings_nav.html.haml # app/views/groups/show.html.haml # app/views/layouts/_head.html.haml # app/views/projects/_settings_nav.html.haml # db/schema.rb # features/project/project.feature # features/steps/project/project.rb
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.