I am using the Active Admin gem in my Rails app, and on one of my models admin page, there is a filter for an association to another model. The drop down menu is displaying #<Model:AxAAAAAA> as opposed to the appropriate attribute.
For instance, if my model were posts, which belonged to users, on the posts admin index page, there would be a filter for users, and in the drop down menu for that filter would be id’s such as #<User:abcd12345>. I would like to be able to display something appropriate in the drop down menu for this filter. How can I do this with Active Admin?
UPDATE
As pointed out in the answer by ciastek, this is very similar to this question and in fact, I am also using “company_name” as an attribute instead of “name”
I was able to solve my problem by passing
:label_method => :company_nameto the resource in the resources.rb file under the ‘admin’ directory.