class String
Humanize
Public Instance Methods
humanize()
click to toggle source
# File lib/helpers/ruby_ext.rb, line 14 def humanize sub(/\A_+/, '') .tr('_', ' ') .sub(/\A\w/) { |match| match.upcase } end
Humanize
# File lib/helpers/ruby_ext.rb, line 14 def humanize sub(/\A_+/, '') .tr('_', ' ') .sub(/\A\w/) { |match| match.upcase } end