diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-25 19:21:53 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-25 19:21:53 +0200 |
commit | 345b3d4b72d3e450a65ec92806be019be512da54 (patch) | |
tree | 8fe1ef43d699a934a96d72a7069c3dfbb3c9cbb4 /app/finders | |
parent | 645e8d470559b07a22164c55b76195a60fb8b37b (diff) | |
download | gitlab-ce-345b3d4b72d3e450a65ec92806be019be512da54.tar.gz |
Update tests and fix Finders readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/README.md | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/finders/README.md b/app/finders/README.md index 6fbf0e2f4c1..47823c51efb 100644 --- a/app/finders/README.md +++ b/app/finders/README.md @@ -3,7 +3,7 @@ This type of classes responsible for collectiong items based on different conditions. To prevent lookup methods in models like this: -``` +```ruby class Project def issues_for_user_filtered_by(user, filter) # A lot of logic not related to project model itself @@ -15,10 +15,8 @@ issues = project.issues_for_user_filtered_by(user, params) Better use this: -``` -selector = Finders::Issues.new - -issues = selector.execute(project, user, filter) +```ruby +issues = IssuesFinder.new.execute(project, user, filter) ``` It will help keep models thiner |