Does rails have an opposite of 'humanize' for strings?

后端 未结 3 924
感动是毒
感动是毒 2020-12-13 08:34

Rails adds a humanize() method for strings that works as follows (from the Rails RDoc):

\"employee_salary\".humanize # => \"Employee salary\"         


        
3条回答
  •  时光取名叫无心
    2020-12-13 08:45

    In http://as.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html you have some methods used to prettify and un-prettify strings.

提交回复
热议问题