I am using a select menu to allow people to pick an item and be taken to
a new page containing that item’s data. Pretty straightforward stuff.
Except that I cannot quite figure out how to do this in Rails.
I do not understand how to grab the variable from the select menu. With
the code I am using, I cannot get the data into the mysql query.
Can someone point me in the right direction?
This is the code for the select menu (it uses an array of arrays in the
<%= start_form_tag :action => ‘history’ %>
|<%= options = [["Select client", ""]] +
select(“notification”, “client”, options) %>
|<%= submit_tag "Select" %>|
<%= end_form_tag %>
This is the code in the controller:
@client = (params[:notification]) @notifications = Notification.find(:all, :conditions => ["client =
Pilgrim IT, LLC
1 Short Street
Northampton, MA 01060
1815 Brownsboro Road
Louisville, KY 40206
NOTICE: This email and any attachments are intended only for the
addressee and may contain information that is confidential and/or
legally privileged. If you are not the intended recipient or have
received this email in error, please notify the sender by return email
or by calling 866-434-4976. You should then delete the message and any
attachments or copies. If you are not the intended recipient, you are
prohibited from retaining, distributing, disclosing or using any
information contained herein.