Friday, March 26, 2010

options_for_select

I have two-element-array [["Credit Card","1",["Cash","2"] serves as options for a drop down box.

After post and error back to redisplay the page, the selected value didn't work. I know we need set the pre-selected value somewhere. But I really have no idea.

I am finally find this blog and know the answer is options_for_select helper.