Skip to content

Instantly share code, notes, and snippets.

@mariuz
Created January 14, 2011 12:33
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 mariuz/9dbec72ab99a70dcb9fa to your computer and use it in GitHub Desktop.
Save mariuz/9dbec72ab99a70dcb9fa to your computer and use it in GitHub Desktop.
new post output
mariuz@borkstationx64:~/work/mynewapp$ script/console
Loading development environment (Rails 2.3.5)
>> p = Post.new(:content => "A new post")
=> #<Post id: nil, name: nil, title: nil, content: "A new post", timestamps: nil>
>> p.save
=> true
>> p.errors
=> #<ActiveRecord::Errors:0x7f4d375a9908 @errors=#<OrderedHash {}>, @base=#<Post id: 1, name: nil, title: nil, content: "A new post", timestamps: nil>>
>> f = Post.first
=> #<Post id: 1, name: nil, title: nil, content: "A new post", timestamps: nil>
>> Post.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment