https://github.com/andyw8/dehumanize
A simple plugin to perform the reverse of the 'humanize' string method in Rails
https://github.com/andyw8/dehumanize
Last synced: 3 months ago
JSON representation
A simple plugin to perform the reverse of the 'humanize' string method in Rails
- Host: GitHub
- URL: https://github.com/andyw8/dehumanize
- Owner: andyw8
- License: mit
- Created: 2009-09-30T23:35:09.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2014-03-06T10:53:01.000Z (about 11 years ago)
- Last Synced: 2025-01-05T19:12:43.969Z (5 months ago)
- Language: Ruby
- Homepage:
- Size: 132 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: MIT-LICENSE
Awesome Lists containing this project
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