method

dasherize

rails latest stable - Class: ActiveSupport::Inflector
dasherize(underscored_word)
public

Replaces underscores with dashes in the string.

dasherize('puni_puni') # => "puni-puni"