Finally got it working, used this solution; <%= select_tag "cat_selected", options_for_select(['Flokkar mælitækis']...@cats_for_mt), :onchange => 'window.location.href = "viewflokkur_from_select/" + this.selectedIndex'%>
That gave me params[:id] = index-selected, so I created this new method viewflokkur_from_select wich gets @cats_for_mt[params[:id].to_i-1] and then redirects to viewflokkur with that value as params[:cat]. Not very pretty, and a whole lot uglier than I expected, but works... Thanks everyone for the suggestions! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

