usuário. @jlucasps irb(main):004:0> bill_1 = Bill.new :name => "Conta 1", :date => Time. utc(2012, 06, 18), :value => 48.90 => #<Bill id: nil, name: "Conta 1", description: nil, user_id: nil, date: "2012-06- 18 00:00:00", value: #<BigDecimal:3fc45d8,'0.489E2',18(45)>, created_at: nil, updated_at: nil> irb(main):012:0> bill_1.user = user => #<User id: 7, name: "Joao Lucas", email: "
[email protected]", age: nil, created_at: "2013-06-18 12:52:30", updated_at: "2013-06-18 12:52:30", gender: nil> irb(main):013:0> bill_1.save (0.1ms) begin transaction SQL (7.7ms) INSERT INTO "bills" ("created_at", "date", "description", "name", "updated_at", "user_id", "value") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 18 Jun 2013 13:03:13 UTC +00:00], ["date", Mon, 18 Jun 2012 00:00:00 UTC +00:00], ["description", nil], ["name", "Conta 1"], ["updated_at", Tue, 18 Jun 2013 13:03:13 UTC +00:00], ["user_id", 7], ["value", #<BigDecimal:31e9878,'0.489E2',18(45)>]] (413.9ms) commit transaction => true