Topic: Multiple Classes or IF in View
I have a qeustion in regard to the design of some classes. I have the following Situation:
I write a server admin backend. So I have Hardware servers and Virtual Servers. A few columns (or fields) are used for both Server types (like hostname, ip-address, ...) but some other fields are only used for One of the server types ( like billing information for the hardware servers or parent-id for the virtual servers.
So how should l approach this? In normal (Java :-) ) I would use three different classes and two different views. Any good hint for Rails?
Is it a good idea to use One-to-One associations for this? Or three classes?