Module: IsTranslatable::Methods

Defined in:
lib/is_translatable.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/is_translatable.rb', line 16

def self.included(klass)
  klass.class_eval do
    include IsTranslatable::Methods::InstanceMethods

    has_many :translations, :as => :translatable, :dependent => :destroy, :autosave => true
    accepts_nested_attributes_for :translations
  end
end