Created
April 16, 2009 04:23
-
-
Save practicingruby/96215 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >> Customer.create(:first_name => "Gregory", :last_name => "Brown") | |
| => #<Customer:0x20d2120 @prefix_options={}, @attributes={"evening_phone"=>nil, "updated_at"=>Thu Apr 16 03:53:59 UTC 2009, "daytime_phone"=>nil, "id"=>1, "first_name"=>"Gregory", "last_name"=>"Brown", "created_at"=>Thu Apr 16 03:53:59 UTC 2009, "email"=>nil}> | |
| >> Customer.find(:all) | |
| => [#<Customer:0x20a939c @prefix_options={}, @attributes={"evening_phone"=>nil, "updated_at"=>Thu Apr 16 03:53:59 UTC 2009, "daytime_phone"=>nil, "id"=>1, "first_name"=>"Gregory", "last_name"=>"Brown", "created_at"=>Thu Apr 16 03:53:59 UTC 2009, "email"=>nil}>] | |
| >> Customer.find(1).first_name | |
| => "Gregory" | |
| >> Customer.delete(1) | |
| => #<Net::HTTPOK 200 OK readbody=true> | |
| >> Customer.find(:all) | |
| => [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment