Forum: Ruby on Rails Options_from_collection_for_select -> Multiple fields in dis

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D9d1b31a337f46ac5e4dd56b55404f58?d=identicon&s=25 Dylan Markow (Guest)
on 2006-01-08 08:14
(Received via mailing list)
Rails mailing list
17d01ff4326c26911481c7a77283b343?d=identicon&s=25 Eric Sloane (Guest)
on 2006-01-08 23:33
(Received via mailing list)
Dylan - I asked this question recently and Mark JAmes answered;
Eric Sloane wrote:

 > How do you concatenate a first_name, last_name as the text method for
OFCFS? Damned if I can do it without error. Is it in the original select
for the collection?

Define an instance method in the model that returns first_name +
and use that as the text method in ofcfs.

And that works fine.
This topic is locked and can not be replied to.