If there a People model, how can I setup a polymorphic association of Users and Customer?
For example, a Person could act as an User or as a Customer. People could be a User( extra columns: username, password), or it could be a Customer(no extra columns).
I’m trying to set this up so
- I won’t have a separate Users table and Customers table
- I don’t want to have a People table with a lot of empty username and password columns
I agree with moo-juice, the correct approach would be people + roles. here’s a concrete example: