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

Coerce num param to int and assign to @_padding #840

Merged
merged 1 commit into from Dec 14, 2016
Merged

Coerce num param to int and assign to @_padding #840

merged 1 commit into from Dec 14, 2016

Conversation

pcriv
Copy link
Contributor

@pcriv pcriv commented Dec 14, 2016

This avoids code failing when calling Model.padding(params[:padding] || 0) since params[:padding] is a string.

@yuki24
Copy link
Member

yuki24 commented Dec 14, 2016

Could you add a test case?

@pcriv
Copy link
Contributor Author

pcriv commented Dec 14, 2016

Sure!

@pcriv
Copy link
Contributor Author

pcriv commented Dec 14, 2016

@yuki24 test added

@yuki24
Copy link
Member

yuki24 commented Dec 14, 2016

It looks great! Could you also squash the commit into the previous one?

@pcriv
Copy link
Contributor Author

pcriv commented Dec 14, 2016

Will do!

This avoids code failing when calling "Model.padding(params[:padding] || 0)" since params[:padding] is a string.
@yuki24 yuki24 merged commit 16d5096 into kaminari:master Dec 14, 2016
@yuki24
Copy link
Member

yuki24 commented Dec 14, 2016

Thanks!

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.

None yet

2 participants