I have a table mobility_string_translations, but I do not understand how to get to it.
Now I have three records. Two records in German and one in Spanish. I want to get only those records that are in German.
this not working:
all_de_posts = Post.i18n.find_by(locale: :de)
First of all you may have a column.(Lets say title.)
On your model
post.rb
you will have something like this:The type is important in order to get the :de records(or the :en).
At
schema.rb
wou will see a table mobility_string_translationsWell now at your console find your records with locale: :de
As you can see at your schema.rb --> "mobility_string_translations" you can play around with your columns in order to find exactly what you want.