selected for select
I have the following code
select "sales", "price", @sale开发者_开发知识库sprice, {: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
Should be:
select "sales", "price", @salesprice, {:selected => "#{@sales}"}
with double quotes around the #{@sales}
精彩评论