Mark Goddard
2006-Aug-15 16:13 UTC
[Rails] Special characters appearing incorrectly using Form Helpers
Hi Am using the select helper to create a drop down of proce/cost options. The prices should be shown in English pounds. Using either of the below methods does not display the pound character correctly. <%= select("product", "cost", ([["Less than ?5","1"], ["?5 - ?9.99","2"], ["?10 - ?19.99","3"], ["More than ?20","4"]]), {:prompt => "Please select"}) %> <%= select("product", "cost", ([["Less than £5","1"], ["£5 - £9.99","2"], ["£10 - £19.99","3"], ["More than £20","4"]]), {:prompt => "Please select"}) %> I have also used options_for_select wrapped by hardcoded select tag which shows the pound character correctly but will not show the value selected for that instance when editing. Any ideas on how to make our precious pound appear in my select drop down? Cheers Mark -- Posted via http://www.ruby-forum.com/.