Method: String#underscore
- Defined in:
- lib/conject/borrowed_active_support_inflector.rb
#underscore ⇒ Object
The reverse of camelize. Makes an underscored, lowercase form from the expression in the string.
underscore will also change ‘::’ to ‘/’ to convert namespaces to paths.
"ActiveRecord".underscore # => "active_record"
"ActiveRecord::Errors".underscore # => active_record/errors
443 444 445 |
# File 'lib/conject/borrowed_active_support_inflector.rb', line 443 def underscore BorrowedActiveSupport::Inflector.underscore(self) end |