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