Skip to content
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

Merged
merged 6 commits into from
Jun 30, 2017
Merged

Conversation

hdf1996
Copy link
Contributor

@hdf1996 hdf1996 commented Jun 29, 2017

Added Generators and initializer

@@ -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,
Copy link
Contributor

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?

Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@icoluccio icoluccio changed the base branch from first-prototype to development June 30, 2017 18:12
Copy link
Contributor

@icoluccio icoluccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase though

@hdf1996 hdf1996 force-pushed the initializers-and-generators branch from d2d90df to 3820aab Compare June 30, 2017 19:13
@hdf1996 hdf1996 merged commit e6dcc32 into development Jun 30, 2017
@hdf1996 hdf1996 deleted the initializers-and-generators branch June 30, 2017 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants