Clay
Clay

Reputation: 159

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?

Upvotes: 3

Views: 2588

Answers (1)

MurifoX
MurifoX

Reputation: 15089

This:

options_for_select(your_array_list, your_selected_value)

Upvotes: 7

Related Questions