[Rails] Two table edition in one time

(Marcin Jurczuk) #1

Helo, I'm starting small app in rails and I found a problem.
There are two databases:
customer (id,name,surname)

I'would like to insert new device with new customer data..
something like:
http://localhost:3000/Customer should show me fields:
New Customer
Name ______________
Surname ____________
Mac _____________

Editing also should change values in both databases..
How acomplish that ?
I try to add belongs_to :customer into device model but it fail ...


Marcin Jurczuk, NIC-HDL: MJ1679-RIPE