Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- author = Author.create(name: 'Yukihiro Matsumoto')
- # (0.1ms) begin transaction
- # Author Create (0.6ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", "9bf631fc-6bed-4cb0-b062-102476609451"], ["name", "Yukihiro Matsumoto"], ["created_at", "2019-06-06 02:18:45.011828"], ["updated_at", "2019-06-06 02:18:45.011828"]]
- # (4.5ms) commit transaction
- # => #<Author id: "9bf631fc-6bed-4cb0-b062-102476609451", name: "Yukihiro Matsumoto", created_at: "2019-06-06 02:18:45", updated_at: "2019-06-06 02:18:45">
- Book.create(title: 'The Ruby Programming Language', author: author)
- # (0.1ms) begin transaction
- # Book Create (0.4ms) INSERT INTO "books" ("id", "title", "author_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", "1ae09f6e-59e5-4cb2-b963-a1ea70a81bc1"], ["title", "The Ruby Programming Language"], ["author_id", "9bf631fc-6bed-4cb0-b062-102476609451"], ["created_at", "2019-06-06 02:18:45.032894"], ["updated_at", "2019-06-06 02:18:45.032894"]]
- # (4.6ms) commit transaction
- # => #<Book id: "1ae09f6e-59e5-4cb2-b963-a1ea70a81bc1", title: "The Ruby Programming Language", author_id: "9bf631fc-6bed-4cb0-b062-102476609451", created_at: "2019-06-06 02:18:45", updated_at: "2019-06-06 02:18:45">
- Book.create(title: 'Ruby Best Practices', author: author)
- # (0.1ms) begin transaction
- # Book Create (0.4ms) INSERT INTO "books" ("id", "title", "author_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", "2bacf441-66dc-43d4-9548-4a4839be88e2"], ["title", "Ruby Best Practices"], ["author_id", "9bf631fc-6bed-4cb0-b062-102476609451"], ["created_at", "2019-06-06 02:18:54.957490"], ["updated_at", "2019-06-06 02:18:54.957490"]]
- # (6.8ms) commit transaction
- # => #<Book id: "2bacf441-66dc-43d4-9548-4a4839be88e2", title: "Ruby Best Practices", author_id: "9bf631fc-6bed-4cb0-b062-102476609451", created_at: "2019-06-06 02:18:54", updated_at: "2019-06-06 02:18:54">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement