I am trying to convert a name from snake case to camel case. Are there any built-in methods?
Eg: \"app_user\"
to \"AppUser\"
(I hav
I got here looking for the inverse of your question, going from camel case to snake case. Use underscore for that (not decamelize):
AppUser.name.underscore # => "app_user"
or, if you already have a camel case string:
"AppUser".underscore # => "app_user"
or, if you want to get the table name, which is probably why you'd want the snake case:
AppUser.name.tableize # => "app_users"