A simple plugin to perform the reverse of the 'humanize' string method in Rails
Ruby
Switch branches/tags
Nothing to show
Latest commit 9cfa0c0 Mar 6, 2014 @andyw8 andyw8 Merge pull request #2 from DonGiulio/patch-1
use parameterize to convert the string
Permalink
Failed to load latest commit information.
lib
tasks Creating fresh plugin Sep 30, 2009
test
MIT-LICENSE
README First release Oct 1, 2009
Rakefile
init.rb
install.rb
uninstall.rb

README

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