class Category < ApplicationRecord
has_many :items, inverse_of: :category
translates :name, :description
active_admin_translates :name, :description
translation_class.validates_presence_of :name
accepts_nested_attributes_for :items
end
class Item < ApplicationRecord
belongs_to :category
translates :name
active_admin_translates :name
end
form do |f|
f.inputs "Translated fields" do
f.translated_inputs 'ignored title', switch_locale: false do |t|
t.input :name
t.input :description
end
end
f.inputs "items" do
f.has_many :items do |f_item|
f_item.inputs "Translated fields" do
f_item.translated_inputs 'ignored title', switch_locale: false do |ft_item|
ft_item.input :name
end
end
end
end
f.actions
end
I am willing to dig into this issue if the mistake is not on my side, but a few pointers would be appreciated, as i am not familiar with this gem, or the activeadmin one.