Closed mhenrixon closed 9 years ago
What if one of the strings in the array contain a |
? You need to escape etc. You might as well serialize to JSON or YAML. And then you can't query it anymore, so you might as well use a blob column.
I prefer not to implement features that would have such limitations. Even more since I beleive you can do it with a custom encoder.
But thanks for the heads up.
No problem at all, I'll just work on my own thing then.
I was using my own hacked together solution until rails 4.2 arrived the file can be found here -> https://gist.github.com/mhenrixon/8fb6f1b8dfbd74d2f734
Allows for 2 custom types to be saved just joining and splitting on a character most likely unused for string and integer arrays
I haven't found a better solution than mine until I stumbled on typedstore. Happy to help if you are interested in supporting arrays as well if not I'll keep working on my own stuff.