how to set default value in combo box or whether there is another way plz explain with example code advance thx have a nice day -- Posted via http://www.ruby-forum.com/.
Narayana Karthik wrote:> > how to set default value in combo box or whether there is another way > > plz explain with example code > > advance thx > have a nice dayNarayana, Just by setting :selected. For example: <%= select(:your_model, "user_id", User.find(:all).collect {|s| [ s.name, s.id ] }, { :include_blank => false, :selected => @your_model.user_id }) %> Jean-Etienne -- Posted via http://www.ruby-forum.com/.