search for: p480

Displaying 1 result from an estimated 1 matches for "p480".

Did you mean: 480
2006 Nov 28
2
collection_select and selected_value
Hi, I am using collection_select to build a drop down list. I would like to have the current value selected. How can I do that? My current code is straight from the example in Pragmatic Programmers book [2nd ed, p480] copying here for reference. <%= @users = User.find(:all, :order => "name" ) form.collection_select(:name, @users, :id, :name) %> I went through the api docs and found that there is a way to do this using selected_value, but an example would be much appreciated. raj --~--~-...