Class: ActiveRecord::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/annotranslate.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.translate(key, options = {}) ⇒ Object Also known as: t

:nodoc:



341
342
343
# File 'lib/annotranslate.rb', line 341

def translate(key, options={}) #:nodoc:
  AnnoTranslate.translate_with_annotation([self.name.underscore], @virtual_path, key, options)
end

Instance Method Details

#tObject

Add a translate (or t) method to ActiveRecord



336
337
338
# File 'lib/annotranslate.rb', line 336

def translate(key, options={})
  AnnoTranslate.translate_with_annotation([self.class.name.underscore], @virtual_path, key, options)
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, options={})
  AnnoTranslate.translate_with_annotation([self.class.name.underscore], @virtual_path, key, options)
end