I'm having trouble populating a select tag in a form? I have moved the form to a partial so it can be used in both the create and edit views. My standard text fields are populated with data from the DB just fine in the edit view, but I can't seem to get the select drop downs to work?
How do I force the default value of a select to the value stored in the DB? Below is an example of what I have: <label for="hours_sunday_open">Open:</label><%= f.select (:hours_sunday_open, @site.open_close_times) %> I've tried the :selected => f.hours_sunday_open It didn't seem to work. 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 -~----------~----~----~----~------~----~------~--~---

