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:
341 342 343 |
# File 'lib/annotranslate.rb', line 341 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
336 337 338 |
# File 'lib/annotranslate.rb', line 336 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
332 333 334 |
# File 'lib/annotranslate.rb', line 332 def translate(key, ={}) AnnoTranslate.translate_with_annotation([self.class.name.underscore], @virtual_path, key, ) end |