Class: AwesomeTranslations::CacheDatabaseGenerator::TranslationValue
- Inherits:
-
BazaModels::Model
- Object
- BazaModels::Model
- AwesomeTranslations::CacheDatabaseGenerator::TranslationValue
- Defined in:
- lib/awesome_translations/cache_database_generator/translation_value.rb
Instance Method Summary collapse
- #calculated_translation_file_path ⇒ Object
- #handler_translation ⇒ Object
- #migrate_to_awesome_translations_namespace! ⇒ Object
Instance Method Details
#calculated_translation_file_path ⇒ Object
10 11 12 |
# File 'lib/awesome_translations/cache_database_generator/translation_value.rb', line 10 def calculated_translation_file_path "#{handler_translation.dir}/#{locale}.yml" if handler_translation end |
#handler_translation ⇒ Object
14 15 16 17 |
# File 'lib/awesome_translations/cache_database_generator/translation_value.rb', line 14 def handler_translation @handler_translation ||= AwesomeTranslations::CacheDatabaseGenerator::HandlerTranslation .find_by(translation_key_id: translation_key_id) end |
#migrate_to_awesome_translations_namespace! ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/awesome_translations/cache_database_generator/translation_value.rb', line 19 def migrate_to_awesome_translations_namespace! AwesomeTranslations::TranslationMigrator.new( translation_key: translation_key, handler_translation: handler_translation, translation_value: self ).execute end |