# Default value for collection\_select

**URL:** <https://www.ruby-forum.com/t/default-value-for-collection-select/118911>\
**Category:** Rails\
**Created:** [November 1, 2007, 9:32am UTC](https://www.ruby-forum.com/t/default-value-for-collection-select/118911 "2007-11-01T09:32:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruchita](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Post date:** [November 1, 2007, 9:32am UTC](https://www.ruby-forum.com/t/default-value-for-collection-select/118911/1 "2007-11-01T09:32:39Z")

</div>

Hi all,

Can we use collection\_select with default selected option. I am  
implementing countries and its corresponding states dropdown through  
Ajax and I have used collection\_select method to select countries. Now  
for editing point of view I want the country which is selected earlier  
should come. Please let me know if someone has any idea about this.

Thanks  
Ruchita S…

---

<div class="post-metadata">

**Author:** ![ruchita](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/22d042/32.png) [@ruchita](https://www.ruby-forum.com/u/ruchita)\
**Post date:** [November 2, 2007, 3:35am UTC](https://www.ruby-forum.com/t/default-value-for-collection-select/118911/2 "2007-11-02T03:35:41Z")

</div>

Hi Ruchita

try using collection\_select\_with\_current. and also you should give the  
value in this as option
