Module: ActsAsTranslator::InstanceMethods
- Defined in:
- lib/translation_center/acts_as_translator.rb
Instance Method Summary collapse
-
#can_admin_translations? ⇒ Boolean
returns true if the user can admin translations.
-
#translation_for(key, lang) ⇒ Object
returns the translation a user has made for a certain key in a certain language.
Instance Method Details
#can_admin_translations? ⇒ Boolean
returns true if the user can admin translations
16 17 18 |
# File 'lib/translation_center/acts_as_translator.rb', line 16 def can_admin_translations? true end |
#translation_for(key, lang) ⇒ Object
returns the translation a user has made for a certain key in a certain language
11 12 13 |
# File 'lib/translation_center/acts_as_translator.rb', line 11 def translation_for(key, lang) self.translations.find_or_initialize_by_translation_key_id_and_lang_and_translator_type(key.id, lang.to_s, self.class.name) end |