# NewbieQ concatenating name in options\_from\_collection\_for\_se

**URL:** <https://www.ruby-forum.com/t/newbieq-concatenating-name-in-options-from-collection-for-se/51367>\
**Category:** Rails\
**Created:** [December 30, 2005, 8:49am UTC](https://www.ruby-forum.com/t/newbieq-concatenating-name-in-options-from-collection-for-se/51367 "2005-12-30T08:49:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![soderic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8baadc/32.png) [@soderic](https://www.ruby-forum.com/u/soderic)\
**Post date:** [December 30, 2005, 8:49am UTC](https://www.ruby-forum.com/t/newbieq-concatenating-name-in-options-from-collection-for-se/51367/1 "2005-12-30T08:49:07Z")

</div>

Hi,  
A real dumb one :~/  
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?  
Eric.

---

<div class="post-metadata">

**Author:** ![soderic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8baadc/32.png) [@soderic](https://www.ruby-forum.com/u/soderic)\
**Post date:** [December 30, 2005, 11:03am UTC](https://www.ruby-forum.com/t/newbieq-concatenating-name-in-options-from-collection-for-se/51367/2 "2005-12-30T11:03:34Z")

</div>

Eric S. 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 +  
last\_name  
and use that as the text method in ofcfs.

–  
We develop, watch us RoR, in numbers too big to ignore.
