activeadmin-translate icon indicating copy to clipboard operation
activeadmin-translate copied to clipboard

Rails 4.2 + Globalize 5.0.1: translate_inputs only displays last field

Open davev opened this issue 9 years ago • 4 comments

using the example ActiveAdmin form:

form do |f|
  f.translate_inputs do |t|
    t.input :title
    t.input :description
  end
end

with Globalize 5.0.1, the translate_inputs helper will only display the :description input in the tabbed UI. (whatever line is last in the block is the only thing displayed.) hence, the hidden field for :locale is not returned either.

p.s. using the Rails 4.0-compatible branch at https://github.com/twintags/activeadmin-translate

davev avatar Mar 30 '15 01:03 davev

Try the following:

form do |f|
  f.inputs do
    f.translate_inputs do |t|
      t.input :title
      t.input :description
    end
  end
end

rbatllet avatar Apr 10 '15 10:04 rbatllet

:+1:

rensverschuren avatar May 28 '15 13:05 rensverschuren

Works for me! Don't forget to add

  # ...
  f.actions
end

at the end of your form for submit options.

sploadie avatar Jun 08 '15 13:06 sploadie

You guys are gods!!!

IvRRimum avatar Nov 26 '15 15:11 IvRRimum