[Rails] Re: populate dropdown

2010-02-01 Thread Sharagoz --
M I R wrote: > i was expecting some magic here The edit page should show the correct selection by "magic" if the form is correct. Could you show us the edit form that isnt working as expected? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: populate dropdown

2010-02-01 Thread M I R
its ok for now, but when i go to edit page how will i populate the dropdown while the selected option will be the one coming from database suppose i have 3 cities ID City 1. London 2. Bristol 3. Cambridge when i was adding record i select Bristol with id 2 now when i go to e

[Rails] Re: populate dropdown

2010-02-01 Thread Rails List
M I R wrote: > Hi, > I am new for RoR i am using > f.select for dropdown and want to populate it from database table > i have a function in cities model which retrieve all cities and i am > doing the follwoing to populate the dropdown > f.select :city_id , @cities > but it display a strange output