Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 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
Something went wrong with that request. Please try again.