From: Brian Candler Date: 2009-01-26T23:32:22+09:00 Subject: Re: xml Harish Dewangan wrote: > i am new ruby on rails ... > i got pure xml now and converting that xml into model object and when i > am trying to save the object it is inserting with the junk values as > shown below Problems with Rails and/or ActiveRecord would best be asked on a Rails mailing list (here you have found the general Ruby programming language list) From a Ruby point of view, I'd suggest you try using 'inspect' on your model before saving it. e.g. # create your model foo = Foo.new(...) # show it STDERR.puts foo.inspect foo.save! This divides your problem in half: if @attributes contains the right data then the problem is when ActiveRecord saves it, but if @attributes contains the bad data then you can work on the first part of your program. > '---- "1"', '--- - "2"', '--- - "3"', '--- - First', '--- - Second', > '--- - third' Strange, looks like it's converting to YAML for some reason. -- Posted via http://www.ruby-forum.com/.