Topic: dropdown list question
Can somebody refresh my memory as to how to access the value of a drop down list?
Right now my view is like this:
<b>Select Quote no: </b>
<select size ="1" name="record[quote_no]">
<% @quotes.each do |quote| %>
<option value ="<%= quote.QuoteNo %>">
<% end %>
I'm defining @quotes in my controller and the values are coming out right. But how to grab the value selected?
It's a rails app built on a legacy dbase scheme so QuoteNo is the name of the field in the records table.
I tried warn params[:record][:quote_no] but it throws me a nil error:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.