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
Jérome Perrin
gitlab-ce
Commits
b2fbeb37
Commit
b2fbeb37
authored
Dec 28, 2015
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove changes in 'paginate' helper
parent
8d455503
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
lib/api/helpers.rb
lib/api/helpers.rb
+2
-4
No files found.
lib/api/helpers.rb
View file @
b2fbeb37
...
@@ -97,10 +97,8 @@ module API
...
@@ -97,10 +97,8 @@ module API
end
end
def
paginate
(
relation
)
def
paginate
(
relation
)
page
=
(
params
[
:page
]
||
1
).
to_i
per_page
=
params
[
:per_page
].
to_i
per_page
=
(
params
[
:per_page
]
||
30
).
to_i
paginated
=
relation
.
page
(
params
[
:page
]).
per
(
per_page
)
paginated
=
relation
.
page
(
page
).
per
(
per_page
)
add_pagination_headers
(
paginated
,
per_page
)
add_pagination_headers
(
paginated
,
per_page
)
paginated
paginated
...
...
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