- Notifications
You must be signed in to change notification settings - Fork3k
Add Phoenix.Naming.titleize/1#6508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chrismccord commentedOct 8, 2025
Do you need this for broader generator use or convenience for your own apps? Not opposed, just wondering if this is part of some larger work or not, but we also have to decide how much we want to place here if we're thinking about adding more utilities. THanks! |
nathanl commentedOct 8, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Convenience in an app. My current example: converting the snake case atoms of an Ecto enum type, like |
| bin= | ||
| ifString.ends_with?(bin,"_id")do | ||
| binary_part(bin,0,byte_size(bin)-3) | ||
| else | ||
| bin | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Maybe the API could be similar to one provided in Rails?https://apidock.com/rails/String/humanize
(I mean thekeep_id_suffix part)
No description provided.