Method: ActiveSupport::Inflector#dasherize

Defined in:
activesupport/lib/active_support/inflector/methods.rb

#dasherize(underscored_word) ⇒ Object

Replaces underscores with dashes in the string.

dasherize('puni_puni') # => "puni-puni"
[View source]

226
227
228
# File 'activesupport/lib/active_support/inflector/methods.rb', line 226

def dasherize(underscored_word)
  underscored_word.tr("_", "-")
end