This project is archived and is in readonly mode.

#147 ✓invalid
Andrew Selder

[PATCH] collection_select not displaying :prompt when value present

Reported by Andrew Selder | May 8th, 2008 @ 08:03 PM

I have form that has the following line:

Parking
<%= ps.collection_select 'ext_parking_id', @parking_options, :id, :name, :prompt => '- Choose Parking Type -' %>

If the ext_parking_id field has no value the prompt displays as expected. However, if a value is present, only the options are present, with no prompt. This is in direct contradiction to the api documentation example. (http://api.rubyonrails.org/class...)

HTML with value present: Parking
Direct Access Single Full Tandem Garage Street Parking Lot Valet

HTML with no value present: Parking
- Choose Parking Type - Direct Access Single Full Tandem Garage Street Parking Lot Valet

Rails 2.0.2, Ruby 1.8.6_p110, Mac OS X 10.5.1

Thanks,

Andrew

(just transferring over from Trac)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages