Module: ModelTranslations

Defined in:
lib/model_translations.rb

Defined Under Namespace

Modules: InstanceMethods

Instance Method Summary collapse

Instance Method Details

#translates(*attributes) ⇒ Object


2
3
4
5
6
7
# File 'lib/model_translations.rb', line 2

def translates(*attributes)
  attributes = attributes.collect{ |attribute| attribute.to_sym }
  
  add_translation_model_and_logic(attributes) unless included_modules.include?(InstanceMethods)
  add_translatable_attributes(attributes)
end