Skip to content

Instantly share code, notes, and snippets.

@ktopping
Created February 8, 2010 16:02
Show Gist options
  • Save ktopping/298287 to your computer and use it in GitHub Desktop.
Save ktopping/298287 to your computer and use it in GitHub Desktop.
[kieran@localhost myapp]$ script/console
Loading development environment (Rails 2.3.2)
>> c = Content.new(:xml => '<content><field1>abc</field1><field2>def</field2></content>')
>> c.save
=> true
>> Content.search.results
=> []
>> Sunspot.commit
=> {"responseHeader"=>{"status"=>0, "QTime"=>33}}
=> Content.search.results
=> [#<Content ... xmll: "<content><field1>abc</field1><field2>def</field2></...", created_at: ...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment