0

If one dumps the output of a postgresql DB, there are two tables indicated (and expected):

mobility_text_translations
mobility_string_translations

COPY public.mobility_string_translations (id, locale, key, value, translatable_type, translatable_id, created_at, updated_at) FROM stdin;

[...]

However if one wants to query those tables from the console (development process making things messy on occasion)

MobilityTextTranslation.last
> NameError (uninitialized constant MobilityTextTranslation)
MobilityStringTranslation.last
> NameError (uninitialized constant MobilityStringTranslation)

which is somewhat unexpected.

What is a way to query to edit/remove records of these tables?

Jerome
  • 5,583
  • 3
  • 33
  • 76
  • Are the classes `MobilityTextTranslation` and `MobilityStringTranslation` defined in your codebase? – Jake Worth Apr 22 '21 at 17:37
  • 1
    The classes are `Mobility::ActiveRecord::StringTranslation` and `Mobility::ActiveRecord::TextTranslation`. When dealing with a library you can't really expect a 1:1 mapping between table names and class names. https://github.com/shioyama/mobility/wiki/KeyValue-Backend – max Apr 22 '21 at 18:10
  • Yes, I used 'somewhat' as I realise the implications. Just couldn't find the proper reference. – Jerome Apr 22 '21 at 19:10

0 Answers0