[eluser]Patrick Reck[/eluser]
Hello!
I have a database with a user table, which contains some foreign keys to some properties about the user.
I'll use a simplified example.
users
Code:
| id | username | password | fk_eye_color | fk_hair_color |
-----------------------------------------------------------
| 1 | patrick | mypassword | 1 | 1 |
properties_hair_colors
Code:
| id | hair_color |
--------------------
| 1 | Brown |
properties_eye_colors
Code:
| id | eye_color |
--------------------
| 1 | Blue |
As you can see, here's a user with Brown hair and Blue eyes. How can I extract this using Active Records?