I'm using rails' select
helper on my page, dynamically populated with Categories
on a page showing news articles. Changing the select should refresh the page and show news articles for the selected category. I'm storing the category id in the session. How do I make my select
show persist the correct selected value? Currently trying this but it doesn't work:
<%= select "session", "news_category_id",
@categories.collect {|c| [ c.name, c.id ]},
{:prompt => "Filter news by company"}
%>