Aman Thind wrote:> No matter what I do, clicking the link does not show me the selected
> value. I have read 20+ posts for the select statement and read the api
> but cannot see why I cannot see the selected value on clicking the
"run
> scenario" link to activate the createipfile action.
Basically, it''s because a link doesn''t submit a form. It gets
a new URL
from the page, in your case always /scenariomgr/createipfile .
You need to create a form that posts to createipfile. The form should
contain your select list element and a submit button. When that submit
button is clicked, the selected value will be passed to the createipfile
action, in which you can retrieve it from the params hash by doing
params[:booknames][:id].
If you insist on having a link submit your form you need to fiddle with
Javascript, but I''d recommend you start with the easy case, which is
the
above.
PS: You might want to follow one or more of the tutorials from
rubyonrails.org/docs to learn more about the basic stuff like
passing parameters and what not.
--
Jakob Skjerning - mentalized.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---