method

dasherize

v7.2.3 - Show latest stable - Class: String
dasherize()
public

Replaces underscores with dashes in the string.

'puni_puni'.dasherize # => "puni-puni"

See ActiveSupport::Inflector.dasherize.