On 8/13/06, Kad Kerforn <kadoudal@wanadoo.fr>
wrote:> Is there any way to display a default message value
''Select'' rather tha
> an empty value when using this option ?
>
> kad
Yes,
<%= collection_select(:location, :state_id, @states, :id, :name,
{ :include_blank => false },
{ :selected => @location.state_id } )
%>
Creates a drop-down, with a blank option, and the current location''s
state selected as default.
--
(**********************************************************
* Peter H. Boling
* Web Application Designer - PanEther, LLC
* email: peter.boling@gmail.com
* blog: http://galtzo.blogspot.com/
* languages: English, Spanish, Portuguese
***********************************************************)