Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 355 Bytes

rails_active_support.md

File metadata and controls

18 lines (14 loc) · 355 Bytes

Converting model names to strings

ActiveSupport::Inflector

'editable_document'.classify
# => "EditableDocument"
'EditableDocument'.constantize
# => EditableDocument (class)
'EditableDocument'.underscore
# => editable_document