Open jsaedtler opened 12 years ago
It's king of really serious change, as the idea of gem is in using symbols, not strings (it's easier to find usages of symbols in project, for example, strings are not immutable, and so on). If you need to use strings like "!" you can also use them as symbols like :"!" or :"-", this is valid ruby syntax. Please let me know if it works.
I've got a legacy database containing these enum columns with "!" values. When i dump the schema via rake db:schema:dump, the enum gem generates these invalid symbols, so the schema.rb isn't valid. You think it's better to always generate :"[enum_value]" kind of values?
It's not necessary to do it always, but if string value contains special symbols (regexp is something like /^\w/) it's better to do it, I deem.
I switched the type of the enums limit array contents from symbols to strings, as enums with values like "!" resulted in invalid symbols ( :! ) enums look now like this:
t.enum "action", :limit => ["-", "s", "i", "c", "!"]