title: Passing multiple param values from view to controller in ERB form
body: <p>I have a form:</p>
  
  <pre><code>&lt;%= form_tag("index", method: "get") do %&gt;
    &lt;%= label_tag(:query, "Search for:") %&gt;
    &lt;%= text_field_tag(:query) %&gt;
  
    &lt;select&gt;
      &lt;%= options_for_select Species.all.collect{|sp| [sp.name, sp.id]}.insert(0, "Select Species") %&gt;
    &lt;/select&gt;
  
    &lt;%= submit_tag("Search") %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I can access <code>:query</code> in the controller via <code>params[:query]</code>. I want to be able to do the same with a dropdown menu from <code>options_select_for</code> when the form is submitted, i.e, access <code>params[:species]</code>.</p>
  
  <p>I attempted doing something like this: </p>
  
  <pre><code>&lt;%= :species, options_for_select Species.all.collect{|sp| [sp.name, sp.id]}.insert(0, "Select Species") %&gt;
  </code></pre>
  
  <p>but Rails seems to dislike doing that and returns an error so I don't think that is the right syntax. How do I access multiple param values in my form?</p>
  
  <p>This is the error: </p>
  
  <pre><code>Started GET "/proteins/index" for ::1 at 2015-08-21 12:11:52 -0700
  Processing by ProteinsController#index as HTML
  []
    Rendered proteins/index.erb within layouts/application (2.0ms)
  Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms)
  
  SyntaxError (C:/Users/Shams/Documents/Overall/topfind4/topfind4.1/app/views/proteins/index.erb:18: syntax error, unexpected ',', expecting ')'
  ...utput_buffer.append=( :species, options_for_select Species.a...
  ...                               ^):
    app/views/proteins/index.erb:18: syntax error, unexpected ',', expecting ')'
  </code></pre>
  
  <p>I am using Rails 4.2 and Ruby 2.0.0.</p>