Am I just using this wrong or does the select_tag helper not accept choices to select from? I am refering to the documentation at ap.rubyonrails.com and in the bottom left finding the function name select_tag I looked up the function select and it does accept choices to select from but it is designed to set a field in an object. I tried building a form using select without an object and the form will render and submit but I am guessing at how to access the value. - Michael
I think this will do what you want: <%= select_tag(:v_type, options_for_select([["Coach", "c"], ["Assistant Coach", "ac"]], @params[:v_type])) %> Access it like so: @params[:v_type] -Tom On 6/24/05, Michael King <kingmt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Am I just using this wrong or does the select_tag helper not accept > choices to select from? > > I am refering to the documentation at ap.rubyonrails.com and > in the bottom left finding the function name select_tag > > I looked up the function select and it does accept choices to select > from but it is designed to set a field in an object. I tried building > a form using select without an object and the form will render and > submit but I am guessing at how to access the value. > > - Michael > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > lists.rubyonrails.org/mailman/listinfo/rails >-- -- Tom Wilcoxen convergentarts.com dreamhost.com/r.cgi?twilcoxen