summaryrefslogtreecommitdiff
path: root/app/finders/README.md
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-25 19:21:53 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-25 19:21:53 +0200
commit345b3d4b72d3e450a65ec92806be019be512da54 (patch)
tree8fe1ef43d699a934a96d72a7069c3dfbb3c9cbb4 /app/finders/README.md
parent645e8d470559b07a22164c55b76195a60fb8b37b (diff)
downloadgitlab-ce-345b3d4b72d3e450a65ec92806be019be512da54.tar.gz
Update tests and fix Finders readme
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/finders/README.md')
-rw-r--r--app/finders/README.md8
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