Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Select field from database with option selected (See related posts)

to post sess[callcenter_client_id]

select("sess", "callcenter_client_id", CallcenterClient.find_all.collect {|p| [ p.name, p.id ] }, { :selected => @sess.callcenter_client_id.to_i })


make sure that the :selected entry is an integer.

You need to create an account or log in to post comments to this site.


Click here to browse all 5140 code snippets

Related Posts