Associate a Readable User Dropdown in ActiveAdmin

Viewed 159

I guess not much help here. When you are trying to associate a user from a dropdown list, and imagine if you have 1000000 users, you would see the user instance. I need it to show the actual user's email address.

enter image description here

app/models/user.rb:

has_one :company

app/models/company.rb:

belongs_to :user

The link I was given has nothing to do with the dropdown's value.

Have I setup my rails association incorrectly? Funny thing was, using rails admin I had no issue in this department as I could associate a company when creating a user but not so with active admin.

All I want is when I select the User dropdown, as in picture, I'd see a list of user email addresses.

1 Answers
Related