views:

20

answers:

1

Hello,

I have the following code

select "sales", "price", @salesprice, {:selected => '#{@sales}'}

This is what is in @salesprice

[["All"], ["Sale"], ["Discount"], ["Free"]]

and when select something, and it renders the partial again, it returns whatever is this first element in the select tag :S

Any help is most appreciated, thank you

+1  A: 

Should be:

select "sales", "price", @salesprice, {:selected => "#{@sales}"}

with double quotes around the #{@sales}

Question Mark
thank you very much, stackoverflow is such a great place with wonderful helping people :) Have a great new years
You too, happy to help
Question Mark