@sgrif Not a question — if I'm right, this is an actual regression. But I'm new to using jsonb columns w/Rails so withholding judgment.
-
-
-
-
Replying to @sgrif
@sgrif Managed to hack together a test case and looks like my suspicion was right. https://gist.github.com/ernie/33f75f2294885b9806f9 … +@tenderlove1 reply 0 retweets 1 like -
Replying to @erniemiller
@sgrif@tenderlove I haven't been using json/jsonb columns extensively until now. Maybe this is expected behavior? Definitely surprised me.1 reply 0 retweets 0 likes -
Replying to @erniemiller
@erniemiller@tenderlove Yes. You don't need to use `serialize` there. I left some comments on the gist.1 reply 0 retweets 0 likes -
Replying to @sgrif
@sgrif@tenderlove I know I don't "need" to, but I have a non-hash/array class I want to use a serializer for.2 replies 0 retweets 0 likes -
Replying to @erniemiller
@sgrif@tenderlove What I am seeing now is that if the column type is jsonb, the "serialized" data isn't JSON, but hash/array. That's fine.2 replies 0 retweets 0 likes -
Replying to @erniemiller
@erniemiller@tenderlove Yeah, the "serialized" data should be whatever the DB type expects, which isn't a string column in this case.1 reply 0 retweets 0 likes -
Replying to @sgrif
@sgrif@tenderlove I get it. I just think we need to call it out more specifically, because I blew hours on it, and I know AR internals.3 replies 0 retweets 0 likes
@erniemiller @tenderlove Yeah, I think the plan was to just mention that `serialize` is the wrong tool for the job for complex cases
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.