Skip to content

Conversation

@emilong
Copy link

@emilong emilong commented Nov 17, 2020

I found that while migrating some existing Rails enum columns to str_enum, I wanted a way to have str_enum "take over" the old enum name and generated methods while pointing at a new column so I could keep both columns for a smooth transition.

To that end, I added another option to str_enum called :column where you can specify the column explicitly.

It doesn't seem to have created any regressions as far as I can tell from the test suite or require a major version bump.

Hoping this might be useful for other folks too!

@swrobel
Copy link

swrobel commented Nov 22, 2022

This seems really valuable as we're evaluating moving our existing enums to str_enums. It seems like it's been a while since this was opened, but thoughts on merging @ankane?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants