Skip to content

Instantly share code, notes, and snippets.

@ultrasaurus
Created September 1, 2009 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ultrasaurus/178929 to your computer and use it in GitHub Desktop.
Save ultrasaurus/178929 to your computer and use it in GitHub Desktop.
>> h = { :ideas => [{ :title => "Some Title", :author => "john Smith"}, {:title => "Whatever", :author => "Sally Snow"}]}
=> {:ideas=>[{:author=>"john Smith", :title=>"Some Title"}, {:author=>"Sally Snow", :title=>"Whatever"}]}
>> h.to_xml
NoMethodError: undefined method `to_xml' for #<Hash:0x5995fc>
from (irb):31
>> h.to_json
NoMethodError: undefined method `to_json' for #<Hash:0x5995fc>
from (irb):32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment