Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [fcoury@macbook 20:30]:~/Projects/caf[master]$ script/console
- Loading development environment (Rails 2.1.2)
- >> a = Abastecimento.new
- => #<Abastecimento id: nil, data: nil, tipo: nil, user_id: nil, turno_id: nil, bico_id: nil, veiculo_id: nil, motorista_id: nil, km: nil, qtd: nil, created_at: nil, updated_at: nil>
- >> a.motorista = Motorista.find(1)
- => #<Motorista id: 1, identificador: "OEXW-10835.51", nome: "Cinthia Oshima", created_at: "2009-02-16 16:14:00", updated_at: "2009-02-16 16:14:00", cnh: nil, expiracao_cnh: nil>
- >> a.veiculo = Veiculo.find(1)
- => #<Veiculo id: 1, identificador: "DKF-8761", descr: "Ford Probe", chassis: nil, centro_de_custo_id: "20", created_at: "2009-02-16 16:13:59", updated_at: "2009-02-16 19:13:59", combustivel_veiculo_id: 4>
- >> a.user = User.find(1)
- => #<User id: 1, login: "admin", identity_url: nil, name: "", email: "admin@example.com", crypted_password: "0158af014ba811bc70598ccee3bb3c3e2c097242", salt: "6cd00f068a4fcb55bdb1940170a169e314deeafa", remember_token: nil, activation_code: "7f1c2c65e9cbee490397986e019aac8e878a68e0", state: "active", remember_token_expires_at: nil, password_reset_code: nil, activated_at: nil, deleted_at: nil, created_at: "2009-02-16 19:14:00", updated_at: "2009-02-16 19:14:00">
- >> a.bico = Bico.find(1)
- => #<Bico id: 1, descr: "Bico 1", bomba_id: 1, created_at: "2009-02-16 16:13:59", updated_at: "2009-02-16 16:13:59", tanque_id: "1">
- >> a.turno = Turno.find(1)
- => #<Turno id: 1, descr: "Manhã", de: "2000-01-01 08:00:00", ate: "2000-01-01 14:00:00", created_at: "2009-02-16 19:13:59", updated_at: "2009-02-16 19:13:59">
- >> a.save!
- => true
Add Comment
Please, Sign In to add comment