Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 f.select not showing current value

I have the following:

<%= f.select :phase_names, options_for_select(["RFP Stage", "Pre Contract", "Awarded", "Unsuccessful", "Completed"]), :class => 'inputboxes' %>

It is storing it in the database, but in the edit view it does not show the stored value. How do I show it?

like image 313
Clay Avatar asked Dec 11 '25 09:12

Clay


1 Answers

This:

options_for_select(your_array_list, your_selected_value)
like image 171
MurifoX Avatar answered Dec 14 '25 05:12

MurifoX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!