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

Pluralize doesn't take Int64 #887

Closed
jwoertink opened this issue Sep 3, 2019 · 3 comments · Fixed by #890
Closed

Pluralize doesn't take Int64 #887

jwoertink opened this issue Sep 3, 2019 · 3 comments · Fixed by #890
Labels

Comments

@jwoertink
Copy link
Member

If you use select_count, it will return Int64, but passing that to pluralize will throw

no overload matches 'SomePage#pluralize' with types Int64, String

https://github.com/luckyframework/lucky/blob/master/src/lucky/page_helpers/text_helpers.cr#L89

My guess is we should probably also support Int16. Maybe we just have a few overloads that convert the type, and pass to a main method?

@paulcsmith
Copy link
Member

paulcsmith commented Sep 3, 2019 via email

@vinibrsl
Copy link
Contributor

vinibrsl commented Sep 4, 2019

Would it be bad to just accept Int? That would cover the following types: BigInt, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8

@paulcsmith
Copy link
Member

Yeah that’s a great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants