Module: ActiveAdmin::Translate::FormBuilder

Defined in:
lib/active_admin/translate/form_builder.rb

Overview

Form builder to build input fields that are arranged by locale in tabs.

Instance Method Summary collapse

Instance Method Details

#translate_inputs(name = :translations, &block) ⇒ Object

Create the local field sets to enter the inputs per locale

Parameters:

  • name (Symbol) (defaults to: :translations)

    the name of the translation association

  • block (Proc)

    the block for the additional inputs



13
14
15
16
17
# File 'lib/active_admin/translate/form_builder.rb', line 13

def translate_inputs(name = :translations, &block)
  form_buffers.last << template.(:div, :class => "activeadmin-translate #{ translate_id }") do
    locale_tabs << locale_fields(name, block) << tab_script
  end
end