From: Brian Candler Date: 2007-05-18T14:01:16+09:00 Subject: Re: Multiple Select Dropdown and Storing Problem On Fri, May 18, 2007 at 06:30:03AM +0900, Jim wrote: > So if I select Car Insurance, Home Insurance and Technology and > submit > it this is what gets written to the DB. Exactly as shown below. > > > --- - "1808" - "1809" - "1810" That looks like YAML, but with some of the whitespace trimmed out. irb(main):001:0> require 'yaml' => true irb(main):002:0> YAML.load(%{--- - "1808" - "1809" - "1810"}) ArgumentError: syntax error on line 0, col 13: `--- - "1808" - "1809" - "1810"' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from /usr/lib/ruby/1.8/yaml.rb:133:in `load' from (irb):2 irb(main):003:0> YAML.load(%{---\n - "1808"\n - "1809"\n - "1810"}) => ["1808", "1809", "1810"] Note that what you're trying to do is to put a quart into a pint pot - i.e. write a ruby Array into a single field in the database.