method

underscore

Importance_2
v2.0.3 - Show latest stable - 1 note - Class: Inflector
underscore(camel_cased_word) public

The reverse of camelize. Makes an underscored form from the expression in the string.

Changes ’::’ to ’/’ to convert namespaces to paths.

Examples

  "ActiveRecord".underscore #=> "active_record"
  "ActiveRecord::Errors".underscore #=> active_record/errors
Show source
Register or log in to add new notes.
September 24, 2009 - (>= v2.2.1)
0 thanks