db seeds
alec-c4 opened this issue · 1 comments
alec-c4 commented
Hi!
I'm trying to write db seeds file with "globalize-way" :) Of course I can write something like
I18n.locale = :en
ak = AnimalKind.find_or_create_by(name: 'Dog')
I18n.locale = :ru
ak.update_attribute(name: 'Собака')
ak.save
But it looks shitty :( Of course I can use globalize-accessors gem to access name_en end name_ru, but I cannot use find_or_create_by method because of error.
Of course I can create csv-file which will contains different translations but its not optimal.
Could you recommend me best practices how to seed db with translations?
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.