rails admin how to put full name of user in association edit

330 views
Skip to first unread message

snowflakekiller

unread,
Jan 18, 2017, 10:39:02 PM1/18/17
to rails_admin
In rails admin, how do I change what's displayed in a relationship selector? I would like to show the full name of a user instead of just a first name as per the image below:


Eduardo Moreno

unread,
Jan 19, 2017, 4:44:25 AM1/19/17
to rails...@googlegroups.com
You could use a object_label_method in your user model in orden to change the value displayed in associations.

Check this:

Let me know if that works.

El ene 18, 2017 11:39 PM, "snowflakekiller" <karun...@gmail.com> escribió:
In rails admin, how do I change what's displayed in a relationship selector? I would like to show the full name of a user instead of just a first name as per the image below:


--
You received this message because you are subscribed to the Google Groups "rails_admin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails_admin+unsubscribe@googlegroups.com.
To post to this group, send email to rails...@googlegroups.com.
Visit this group at https://groups.google.com/group/rails_admin.
For more options, visit https://groups.google.com/d/optout.

Scott Hoch

unread,
Aug 7, 2017, 10:08:36 PM8/7/17
to rails_admin
Create a method called ```title``` on the model you wish to search
Reply all
Reply to author
Forward
0 new messages