Simple Problem

Hello There,

I have a minor problem that is driving me a bit crazy and was hoping maybe someone can see something I'm not...

In my view I have the following code:

<p align=center> <b>Choose A Cuisine:</b> <%= collection_select(:restaurant, :cuisine_id , @cuisine, :id, :name, :prompt => 'Any') %> </p>

Now I am trying to access the selected value in my controller with the following code:

@cuisineID = params[:restaurant_cuisine_id]

Unfortunately @cuisineID always comes back NIL for some reason. When I check the development log I see that the param is actually being set properly:

  Parameters: {"restaurant"=>{"cuisine_id"=>"8"}, "search"=>"110 ros valley rd, Toronto, On, Canada", "action"=>"index", "....)

If it helps, my view is for an index action and so there is no restaurant variable to set in the page. The drop down is part of a search.

Thanks,

Steve

it's: params[:restaurant][:cuisine_id]

Thorsten Mueller wrote:

it's: params[:restaurant][:cuisine_id]

Thanks a lot. Appreciate the help!

steve