Can't understand how Rails association with models works. Here is simple question:
There are two tables
products
id| name | status
1 | Tube | 0
2 | Pillar | 1
3 | Book | 0
4 | Gum | 1
5 | Tumbler | 2
statuses
status | name
0 | Unavailable
1 | In stock
2 | Discounted
With ~ same names for models and controllers.
I don't what to create new row in statuses table on every new product. And i want to show status name in erb. What should i write in models and in migration file (for example for which belong_to, has_one or has_many...)?