Drop down

i am using following code for drop down.

<%= select_tag(‘abc’,"" +
options_from_collection_for_select(@priorarr,:Id,:Priority,:selected =>
params[:cs_priority])) %>

it is giving me one drop down with the values populated from the
@priorarr” array.

Now i want to use this value inside my controller class.

i am using params[:cs_priority]…
but not working…

please help me…in reading value from the drop down…

Thanks in advance…

On 20 Aug 2008, at 16:01, Ga Ga wrote:

@priorarr” array.

Now i want to use this value inside my controller class.

i am using params[:cs_priority]…
but not working…

Take a look in your logs at the params your app is receiving and
you’ll see that it’s accessible as params[:abc] (since ‘abc’ is the
first parameter you’re passing to select_tag)

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs