I'm trying to create a dropdown list that's populated from a model but
which has the 2nd item in the model as the default selection. This is
possible.
Here's the model snippet.
PROPERTY_TYPES = [['Choose', ''],
['Residential', 'Residential'],
['Commercial', 'Commercial']]
Here's the form snippet
<%= f.select :property_type, Lead::PROPERTY_TYPES, :style => 'width:
100px;' %>
Is there a way to have the form default to "Residential" but still
allow the user to select either?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---