Charanya Nagarajan wrote: > If you want to have a default selected value then you can use select_tag > > <%= select_tag :brand, options_for_select(['Brand 1', 'Brand 2', 'Brand > 3', 'Brand 4'], "Brand 2") %> > > You had used this > <%= f.collection_select :brand, ['Brand 1', 'Brand 2', 'Brand 3', 'Brand > 4'], :to_s, :to_s %> > > in case if the form f object is for article then u can use > > <%= select_tag 'article[brand]', options_for_select(['Brand 1', 'Brand > 2', 'Brand 3', 'Brand 4'], "Brand 2") %> > > > Hope this helps.
Thank you :) -- Posted via http://www.ruby-forum.com/. -- 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.

