Can ash_admin render a select box for an attribute that is a foreign key for a belongs_to relationship?

This seems like it should be possible, and a scan of the ash_admin code shows me that it might be possible, but I can also see why it might not be.

I’ll simplify the problem down: I have an Item resource and a Category resource. The Item resource has a :category_id attribute and a belongs_to relationship to the Category. What I would love to have in ash_admin is a select box for Category on the :create and :update forms, so I don’t have to copy/paste the :category_id from somewhere else. This seems like it would be a normal convenience for an admin tool.

If the answer’s “yes, of course it can do that and you must be configuring it incorrectly” then I’ll provide further detail. But I do have that small hunch that “no, it’s not possible because of xyz”.

Thanks :slight_smile:

It doesn’t do it currently, but the only thing missing is some elbow grease and configuration. PRs welcome! I’d like to get to it at some point but I’m very busy :slight_smile:

2 Likes

Very much agree this is the one feature I am missing to have this be a killer part of my setup