has_many selector title

27 views
Skip to first unread message

Cameron Barker

unread,
Nov 2, 2012, 4:10:29 PM11/2/12
to rails...@googlegroups.com
Hi all,

Been testing out Rail_Admin on a new site I'm working on.  Really enjoy it!

I have a 2 models, Country and Stores.  Where country has_many stores and stores belongs_to country.  When I create a store a selector field named Country has a pull down menu to choose which country the store will be belong to.  My question is:

In that pull down it outputs Country #1, Country #2 and so on.  I'd rather it out put the name category of the country, United States, Canada.  Is there a way to do this?

Thank you!

Benoit Bénézech

unread,
Nov 12, 2012, 8:48:58 AM11/12/12
to rails...@googlegroups.com
Hey,

Just add a name or title function in your Cuntry model.

Otherwise read the wiki, there is a lot of infos you will need to customize RailsAdmin behavior.

Cheers,

Ben
Reply all
Reply to author
Forward
0 new messages