Skip to content

Instantly share code, notes, and snippets.

@daveworth
Created April 9, 2012 12:19
Show Gist options
  • Select an option

  • Save daveworth/2343105 to your computer and use it in GitHub Desktop.

Select an option

Save daveworth/2343105 to your computer and use it in GitHub Desktop.
Our quick investigation in the rails console
Loading development environment (Rails 3.2.3)
1.9.3-p125 :001 > FactoryGirl.create :railsy_object
(0.0ms) begin transaction
SQL (2.8ms) INSERT INTO "railsy_objects" ("clean", "created_at", "simple", "updated_at") VALUES (?, ?, ?, ?) [["clean", nil], ["created_at", Mon, 09 Apr 2012 11:39:38 UTC +00:00], ["simple", nil], ["updated_at", Mon, 09 Apr 2012 11:39:38 UTC +00:00]]
(1.2ms) commit transaction
=> #<RailsyObject id: 4, created_at: "2012-04-09 11:39:38", updated_at: "2012-04-09 11:39:38", simple: nil, clean: nil>
1.9.3-p125 :002 > ro = _
=> #<RailsyObject id: 4, created_at: "2012-04-09 11:39:38", updated_at: "2012-04-09 11:39:38", simple: nil, clean: nil>
1.9.3-p125 :003 > ro.simple?
=> false
1.9.3-p125 :004 > ro.clean?
=> false
1.9.3-p125 :005 > ro.complicated?
=> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment