Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
yuki24 merged 1 commit intokaminari:masterfrom
pcriv:master
Dec 14, 2016
Merged

Coerce num param to int and assign to @_padding#840
yuki24 merged 1 commit intokaminari:masterfrom
pcriv:master

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.

2 participants