Skip to content

A simple plugin to perform the reverse of the 'humanize' string method in Rails

License

Notifications You must be signed in to change notification settings

andyw8/dehumanize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dehumanize
==========

This plug-in adds a new method called 'dehumanize' to the Rails string inflections, roughly the reverse of the built-in 'humanize' method: It lowercases the full string and replaces spaces with underscores. It does not modify hyphens.

Originally built to aid in writing Cucumber examples but probably has other uses.

Example
=======

"Employee salary".dehumanize # => "employee_salary"

Installation
============

script/plugin install git://github.com/andyw8/dehumanize.git

Copyright (c) 2009 Andy Waite, released under the MIT license

About

A simple plugin to perform the reverse of the 'humanize' string method in Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages