Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
0eefb75ffb11
Commit
9e0a7ecb
authored
Oct 08, 2014
by
Robert Schilling
Browse files
Merge pull request #7991 from cirosantilli/app-finders-readme
Improve formatting of app/finders/README.md [failure unrelated]
parents
91e46daaf3d5
028f817c01be
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/finders/README.md
View file @
0eefb75f
# 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