Skip to content

Instantly share code, notes, and snippets.

@Breefield
Created November 22, 2013 19:10
Show Gist options
  • Save Breefield/7605205 to your computer and use it in GitHub Desktop.
Save Breefield/7605205 to your computer and use it in GitHub Desktop.
Event.create(name: 'Coffee Party', location_attributes: {address: '3126 16th St. San Francisco, CA 94103'})
# (0.2ms) begin transaction
# SQL (2.8ms) INSERT INTO "events" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", Fri, 22 Nov 2013 19:09:51 UTC +00:00], ["name", "Coffee Party"], ["updated_at", Fri, 22 Nov 2013 19:09:51 UTC +00:00]]
# SQL (0.3ms) INSERT INTO "locations" ("address", "created_at", "latitude", "located_id", "located_type", "longitude", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["address", "3126 16th St. San Francisco, CA 94103"], ["created_at", Fri, 22 Nov 2013 19:09:51 UTC +00:00], ["latitude", 37.7648968], ["located_id", 2], ["located_type", "Event"], ["longitude", -122.4225344], ["updated_at", Fri, 22 Nov 2013 19:09:51 UTC +00:00]]
# (2.2ms) commit transaction
# <Event id: 2, name: "Coffee Party", created_at: "2013-11-22 19:09:51", updated_at: "2013-11-22 19:09:51">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment