node.inflection icon indicating copy to clipboard operation
node.inflection copied to clipboard

`underscore` doesn't translate dashes like Rails

Open ghost opened this issue 5 years ago • 0 comments

In Rails String#underscore translates dashes - into _.

Output from pry using Rails:

[15] pry(main)> "credable-searches".underscore
=> "credable_searches"

In this library dashes keep being dashes.

Output from console calling underscore

underscore: credable-searches -> credable-searches

ghost avatar May 15 '19 11:05 ghost