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

parameterize default separator does not match ActiveSupport #12

Open
Petercopter opened this issue Jan 16, 2019 · 0 comments
Open

parameterize default separator does not match ActiveSupport #12

Petercopter opened this issue Jan 16, 2019 · 0 comments

Comments

@Petercopter
Copy link

Petercopter commented Jan 16, 2019

Hey there fellow Rubyist, thanks for making this available. I noticed a difference in the way inflected handles parameterize on strings, specifically the separator.

ActiveSupport parameterize
https://api.rubyonrails.org/classes/ActiveSupport/Inflector.html#method-i-parameterize
parameterize(string, separator: "-", preserve_case: false)

inflected parameterize
parameterize(string, separator: "")

Example string is the name of a pet from World of Warcraft: Lil' Ben'fon

ActiveSupport parameterize:

"Lil' Ben'fon".parameterize
=> "lil-ben-fon"

inflected parameterize

parameterize("Lil' Ben'fon")
=> `lil-benfon`
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

No branches or pull requests

1 participant