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:



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

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



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

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



331
332
333
# File 'lib/annotranslate.rb', line 331

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