rails_admin table of has_many in the show?
Asked Answered
E

1

6

I would like to show a related has_many set of objects in the show view of the parent object as a table.

Currently the has_many items are just being shown as a list separated by commas.

How can I show the has_many items as a table and specify the columns to include?

Edieedification answered 20/5, 2013 at 11:32 Comment(0)
C
-3

For example Article has_many Autors.

Then you should just add in Article class:

accepts_nested_attributes_for :autors, allow_destroy: true
attr_accessible :autors_attributes

More info https://github.com/sferik/rails_admin/wiki/Has-and-belongs-to-many-association

Champlain answered 31/5, 2013 at 23:37 Comment(1)
I don't understand why this is an accepted answer. This doesn't answer the OP problem.Mat

© 2022 - 2024 — McMap. All rights reserved.