Skip to content

Instantly share code, notes, and snippets.

@tjmcewan
Created June 7, 2011 11:00
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 tjmcewan/1012032 to your computer and use it in GitHub Desktop.
Save tjmcewan/1012032 to your computer and use it in GitHub Desktop.
ruby-1.8.7-p334 :001 > task = Task.create(:name => "test")
=> #<Task id: 4364, name: "test", created_at: "2011-06-07 10:38:24", updated_at: "2011-06-07 10:38:24">
ruby-1.8.7-p334 :003 > task.destroy
=> #<Task id: 4364, name: "test", created_at: "2011-06-07 10:38:24", updated_at: "2011-06-07 10:38:47">
ruby-1.8.7-p334 :004 > task
=> #<Task id: 4364, name: "test", created_at: "2011-06-07 10:38:24", updated_at: "2011-06-07 10:38:47">
ruby-1.8.7-p334 :005 > task.present?
=> true
ruby-1.8.7-p334 :007 > task.reload
ActiveRecord::RecordNotFound: Couldn't find Task with ID=4364
ruby-1.8.7-p334 :008 > task
=> #<Task id: 4364, name: "test", created_at: "2011-06-07 10:38:24", updated_at: "2011-06-07 10:38:47">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment