class String

def dasherize

See ActiveSupport::Inflector.dasherize.

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

Replaces underscores with dashes in the string.
def dasherize
  ActiveSupport::Inflector.dasherize(self)
end