Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using Symbols #1063

Open
jwoertink opened this issue Aug 25, 2024 · 0 comments
Open

Stop using Symbols #1063

jwoertink opened this issue Aug 25, 2024 · 0 comments

Comments

@jwoertink
Copy link
Member

Related: #1061

While working on #1059 I'm having to do a lot of transforming since columns will need to be wrapped in quotes. Since we're using Symbol all over the place, I have to make sure I convert in to String, and then it ends up getting used in a string anyway... I thought we had an issue already talking about this, but I'm not sure where it's at.

On the one hand, this looks nice add_index :users, [:email], but it's not much more than add_index "users", ["email"]. The other issue is with a Symbol is we lose the ability to do checks like .ends_with? without first converting to a String anyway.

I know in some cases we allow both Symbol and String, but why not just enforce a single type for consistency and reduce a few Unions in the code.

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

No branches or pull requests

1 participant