Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/annotranslate.rb
Class Method Summary collapse
-
.translate(key, options = {}) ⇒ Object
(also: t)
:nodoc:.
Instance Method Summary collapse
-
#t ⇒ Object
Add a
translate
(ort
) method to ActiveRecord. -
#translate(key, options = {}) ⇒ Object
Add a
translate
(ort
) method to ActiveRecord.
Class Method Details
.translate(key, options = {}) ⇒ Object Also known as: t
:nodoc:
340 341 342 |
# File 'lib/annotranslate.rb', line 340 def translate(key, ={}) #:nodoc: AnnoTranslate.translate_with_annotation([self.name.underscore], @virtual_path, key, ) end |
Instance Method Details
#t ⇒ Object
Add a translate
(or t
) method to ActiveRecord
335 336 337 |
# File 'lib/annotranslate.rb', line 335 def translate(key, ={}) AnnoTranslate.translate_with_annotation([self.class.name.underscore], @virtual_path, key, ) end |
#translate(key, options = {}) ⇒ Object
Add a translate
(or t
) method to ActiveRecord
331 332 333 |
# File 'lib/annotranslate.rb', line 331 def translate(key, ={}) AnnoTranslate.translate_with_annotation([self.class.name.underscore], @virtual_path, key, ) end |