You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 toString
, 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 thanadd_index "users", ["email"]
. The other issue is with aSymbol
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
andString
, but why not just enforce a single type for consistency and reduce a few Unions in the code.The text was updated successfully, but these errors were encountered: