3

I'm trying to customize the has_many portion of an ActiveAdmin form. Here's the raw form:

f.has_many :users do |ff|
  ff.input :user
  ff.input :role
end

I would like that form to render as inline fields, like a table. I've tried this:

f.has_many :users do |ff|
  columns do
    column do
      ff.input :user
    end
    column do
      ff.input :role
    end
  end
end

That renders correctly, but then it still renders the other non-inline view right after the inline view. So it's duplicating the has_many portion of the field.

What am I doing wrong here?

kid_drew
  • 3,857
  • 6
  • 28
  • 38

1 Answers1

1

I'm surprised this works at all. There's been an open issue related to columns in has_many for a while (#4043) You may want to comment there but I know of no plans to fix it. A workaround is provided as an answer at Active Admin Rails 4 inline form

Piers C
  • 2,880
  • 1
  • 23
  • 29