user1051849
user1051849

Reputation: 2337

rails_admin Handling Ancestry Category Trees

I'm evaluating rails_admin but am coming up against a problem with our use of the ancestry gem. In an admin context the default rails_admin simply displays the ancestry key as a text value (which is not that useful).

What would be better would be the ability to view the ancestry (up and down) for a given category in the show view, and to be able to select a new parent in the edit view (i've managed to create the dropdown, but not the control to preselect the current parent if there is one).

Have you come across this problem and do you have any ideas how to get round it?

Thanks!

Upvotes: 0

Views: 2257

Answers (2)

dalpo
dalpo

Reputation: 370

I wrote this plugin using jquery nestable: https://github.com/dalpo/rails_admin_nestable

rails_admin_nestable

For more details see the github readme.

Upvotes: 3

denmarkin
denmarkin

Reputation: 233

I have proper rendering of hierarchies with https://github.com/mceachen/closure_tree. Haven't tried ancestry with it though.

Give it a try and let us know

list of hierarchy edit screen

Upvotes: 2

Related Questions