[Rails] Two table edition in one time...

M

Marcin Jurczuk

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

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 ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,498
Latest member
log5Sshell/alfa5

Latest Threads

Top