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
Here's a problem I have, which might be (very?) common for users of this gem: I have a model Foo with an hstore column metadata. It's possible that it has no metadata at all, or many key/values. Wherever I access the metadata, I have to do ye olde @foo.metadata && @foo.metadata['my_key'] because @foo.metadata might be nil.
I would rather that in the case of a NULL metadata column, @foo.metadata returned {}. In my use case, metadata being nil has no semantic purpose.
Seems like it was solved for the gem in this commit.
The text was updated successfully, but these errors were encountered:
Is is possible to set a default value for the new native Hstore column?
I'll quote @jjb, who explains the problem at issue 22 of activerecord-postgres-hstore gem:
Seems like it was solved for the gem in this commit.
The text was updated successfully, but these errors were encountered: