It seems to be so simple, but it was causing me problems.
I have a select_tag that pulls from a model. All I want is for a person to choose their location from the drop-down list, click "Submit" and go to this page.
That's what i
<% form_tag installation_path do %> <%= select_tag :id, options_from_collection_for_select(Installation.find(:all), :id, :name) %> <div id="button"> <p> <%= submit_tag "Go", :name => nil %> </p> </div>
The problem is that she, of course, wants :id , but does not get :id from the drop-down menu below.
What am I doing wrong, any other suggestions on the βrightβ way to do this.
thanks
ruby-on-rails forms
looloobs
source share