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
But if I didn't want to load the User model into an instance is there a way to utilize hstore_accessor to pluck out just the reminders_enabled value? I can currently do something like:
But that is less than ideal because we lose the translation of the string "true" to the value true and I'd rather not hardcode the Postgres "settings->'notifications_enabled'" query.
Say I have a
User
model with an hstore field calledsettings
that contains a boolean callednotifications_enabled
. That allows me to doBut if I didn't want to load the
User
model into an instance is there a way to utilizehstore_accessor
to pluck out just thereminders_enabled
value? I can currently do something like:But that is less than ideal because we lose the translation of the string
"true"
to the valuetrue
and I'd rather not hardcode the Postgres"settings->'notifications_enabled'"
query.Ideally we could do something like:
The text was updated successfully, but these errors were encountered: