instance method
dasherize
Ruby on Rails 4.2.9
Since v2.2.3Signature
dasherize(underscored_word)
Replaces underscores with dashes in the string.
'puni_puni'.dasherize # => "puni-puni"
Parameters
-
underscored_wordreq
Source
# File activesupport/lib/active_support/inflector/methods.rb, line 187
def dasherize(underscored_word)
underscored_word.tr('_', '-')
end
Defined in activesupport/lib/active_support/inflector/methods.rb line 187
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector