-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initializers and generators #12
Conversation
@@ -11,8 +11,8 @@ def adapt?(content) | |||
def adapt(content, page, limit) | |||
content_array = content.to_a | |||
sliced_content = content_array.slice((page - 1) * limit, limit) | |||
Wor::Paginate::Formatter.format(sliced_content, sliced_content.count, | |||
content_array.count, page) | |||
Wor::Paginate::Config.formatter.format(sliced_content, sliced_content.count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make it so that the user can send a custom formatter per request as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do this in another PR #3
Wor::Paginate::Formatter.format(to_paginate, | ||
to_paginate.count, | ||
to_paginate.total_count, page) | ||
Wor::Paginate::Config.formatter.format(to_paginate, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase though
d2d90df
to
3820aab
Compare
Added Generators and initializer