Conversation
|
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! |
|
Convenience in an app. My current example: converting the snake case atoms of an Ecto enum type, like |
| bin = | ||
| if String.ends_with?(bin, "_id") do | ||
| binary_part(bin, 0, byte_size(bin) - 3) | ||
| else | ||
| bin | ||
| end |
There was a problem hiding this comment.
Maybe the API could be similar to one provided in Rails? https://apidock.com/rails/String/humanize
(I mean the keep_id_suffix part)
No description provided.