# Filling Dropdowns with 2 database columns

**URL:** <https://www.ruby-forum.com/t/filling-dropdowns-with-2-database-columns/89097>\
**Category:** Rails\
**Created:** [March 17, 2007, 7:46am UTC](https://www.ruby-forum.com/t/filling-dropdowns-with-2-database-columns/89097 "2007-03-17T07:46:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gelpimp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/ec9cab/32.png) [@gelpimp](https://www.ruby-forum.com/u/gelpimp)\
**Post date:** [March 17, 2007, 7:46am UTC](https://www.ruby-forum.com/t/filling-dropdowns-with-2-database-columns/89097/1 "2007-03-17T07:46:34Z")

</div>

hello,

new to the whole rails thing, new to the group, too. please forgive  
me if i’m asking this in the wrong place. if so, please direct me to  
the proper place.

this seems to be extremely basic, but it is early in the morning, and  
i can’t seem to figure it out:

i would like to fill a ‘name’ dropdown list with the standard  
firstname lastname concatenation of two database columns.

\<%= select(“card”, “player\_id”, Player.find(:all).collect{|p|  
[p.lastname, p.id]}) %\>

this seems to fill the lastname just fine, though obviously all i give  
it is p.lastname. how would i get both first and last name to show?

thanks in advance. again my apologies if i posted this out of place.  
michael
