-
Notifications
You must be signed in to change notification settings - Fork 88
Get a list of available locales #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There isn't a way to do it currently, but you're right that it would be good to have something that any backend could use in the same way. There are a few things like this that I've left out so far to focus on making sure the core of the gem works without issues, which it seems to do now, so I'm open to taking these kinds of feature requests. I'll keep note of this and in the next phase of work (probably in the next few weeks) think about how to implement them in a backend-independent way. |
@shioyama Any ETA? Is it possible to like grab the jsonb data instead of only returning the language specific translation? |
You can always get the jsonb hash with Of course this is jsonb-specific, other backends would have to be handled differently, and that's what I'm thinking about. Probably something like |
This has been merged into the I'll be releasing 0.2.0 with a bunch of changes in the next day or so. |
Is there a way to get a list of the locales in which a certain attribute has a value? I'm using the postgres jsonb backend, and I know I could just do
@model.read_attribute(:title).keys
, but that seems brittle and like there ought to be a way that doesn't require me to know about the json blob structure.The text was updated successfully, but these errors were encountered: