Module: ActiveAdmin::Globalize3::ActiveRecordExtension

Defined in:
lib/active_admin/globalize3/active_record_extension.rb

Defined Under Namespace

Modules: Methods

Instance Method Summary collapse

Instance Method Details

#active_admin_translates(*args, &block) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/active_admin/globalize3/active_record_extension.rb', line 12

def active_admin_translates(*args, &block)
  translates(*args.dup)
  args.extract_options!

  if block
    translation_class.instance_eval &block
  end
  translation_class.attr_accessible :locale
  translation_class.attr_accessible *args

  attr_accessible :translations_attributes
  accepts_nested_attributes_for :translations, allow_destroy: true

  include Methods
end