Rails select helper - Default selected value, how?
Rails 3.0.9
select options_for_select([value1, value2, value3], default)
Use the right attribute of the current instance (e.g. @work.project_id
):
<%= f.select :project_id, options_for_select(..., @work.project_id) %>
This should do it:
<%= f.select :project_id, @project_select, :selected => params[:pid] %>