Unable to retrieve selected value

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 Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern. to learn more about the basic stuff like passing parameters and what not.