Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
79840657
Commit
79840657
authored
Oct 07, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve formatting of app/finders/README.md
parent
bbc52b00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
app/finders/README.md
app/finders/README.md
+4
-4
No files found.
app/finders/README.md
View file @
79840657
# Finders
This type of classes responsible for collection
g
items based on different conditions.
To prevent lookup methods in models like this:
This type of classes responsible for collection items based on different conditions.
To prevent lookup methods in models like this:
```
ruby
class
Project
...
...
@@ -13,10 +13,10 @@ end
issues
=
project
.
issues_for_user_filtered_by
(
user
,
params
)
```
Better use this:
Better use this:
```
ruby
issues
=
IssuesFinder
.
new
.
execute
(
project
,
user
,
filter
)
```
It will help keep models thiner
It will help keep models thiner
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment