I feel really stupid spending over 24 hours trying to figure out 1 line
of code but I still can’t get it.
I have a table addpackages, that I want to update multiple fields from
table rosters based on the selection of a drop down.
@addpackage = Addpackage.new(@params[“add”])
In new.rhtml (view):
<%=options_from_collection_for_select(@rosters, “email”, “lname”,
selected_value = nil)%>
This code works perfect for obtaining the correct email address based on
drop down and updating the addpackages table. I could replace “email”
with “fname”, “lname”, etc etc and it would work fine also. Whats
killing me is I can only get one parameter to pass and update. I
cannot for the life of me figure out how to pass email, fname, and lname
based on the selected drop down.