method
underscore
v2.0.3 -
Show latest stable
- Class:
ActiveSupport::CoreExtensions::String::Inflections
underscore()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