开发者

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}

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜