# :selected option is ignored for collection\_select

**URL:** <https://www.ruby-forum.com/t/selected-option-is-ignored-for-collection-select/158490>\
**Category:** Rails\
**Created:** [January 23, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/selected-option-is-ignored-for-collection-select/158490 "2009-01-23T21:18:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylorstrait](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Post date:** [January 23, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/selected-option-is-ignored-for-collection-select/158490/1 "2009-01-23T21:18:01Z")

</div>

Is there a workaround for this issue yet? I just wasted a ton of time  
trying to debug this in an AJAX form.

[http://rails.lighthouseapp.com/projects/8994/tickets/1037-selected-option-is-ignored-for-collection\_select](http://rails.lighthouseapp.com/projects/8994/tickets/1037-selected-option-is-ignored-for-collection_select)

* * *

Reported by YoNoSoyTu | September 12th, 2008 @ 11:07 PM | in 2.3

The :selected option in collection\_select is ignored. This patch uses  
the value of :selected option if it is provided, otherwise normal Rails  
behaviour apply.
