I have this link in my code:
link_to "New question", new_question_url(:category_id => @category.id)
I have this code in my new question form:
<p>
<%= f.label :category_id %><br />
<%= f.collection_select :category_id, Category.all, :id, :name %>
</p>
How can I make Rails automatically select the category from the category_id
querystring item, so it is the default one in the collection_select
?
Thanks.