Again I can't get my head around a simple RoR drop down.
for my first drop down all a need is a simple number list which I have
in the "ascential" controller
@size = [12,13,14,15,16,16.5,17,18,19,212,13,0,21,22,23,24]
( I have a tire model and I want to be able to display all my tires
based on the drop down search criteria from the "ascential" index view)
when I've looked up ruby and selects in most all are in a form_for.
I don't know why I would need a form_for in this case.
Form_for refers to a model. But I have no model I need to refer to I
simpley want these options to be shown, which I can do from an array. In
my index I have
<% for size in @size %>
<option><%=h size %>"</option>
<div id="search_button"><%= link_to 'Search' ,:controller =>
"ascential", :action => "tire_result", :id => 16%></div>
This gives me a drop down with the options filled with the correct
numbers. I need to figure out how to get :id to equal the selected index
my brain wants to see some thing like " :id =>
but I don't know how ruby calls selected indexes with out the form_for.
So if I have to use Form_for ...to do drop downs... then I have to refer
to a model. So would I put the @size array in a "ascentail" model and
refer to it
how do I structure a form_for that isn't submiting any thing..
SO I think that I have set it up all wrong but I can't seem to get my
head around how to start it.
the link_to works if :id equals a number
Yikes this is bad