How can is display 2 models in one view
to learn rails i have written a little webapp, to track which employee is using which computer and what software is installed on it. I started with
rails generate scaffold Client deviceName:string deviceComment:text
Everything works fine and i can add, edit or destroy Cients. Now i want to track the software which is installed on every machine. This time i only created a model with
rails generate model Software title:string licence:string
My question is now, how can i "add" Softwaretitle and the licencenumber?
i want to show the Label for the softwaretitle and the licencenumber on the same site where i can add n开发者_如何转开发ew clients. Precise on the clients/new site.
Is this possible?
Thanks in advance for your answers!
Regards, Buk
You need setup relationship between models, you can read it there http://edgeguides.rubyonrails.org/association_basics.html After that you can call software that related to the client
精彩评论