I am trying to create a belongs_to relation between 2 tables.
table users
id
login
.
table apps
id
admin
.
.
I need to create a belongs_to relation on the App model. The admin
column in apps references the user login. I will have used user_id
instead of the login name but I can't change this right now (so they
said), so I have to try to make the relationship as it is. I did the
following but I don't know how to put that admin should reference the
User login column:
I am trying to create a belongs_to relation between 2 tables.
table users
id
login
.
table apps
id
admin
.
.
I need to create a belongs_to relation on the App model. The admin
column in apps references the user login. I will have used user_id
instead of the login name but I can't change this right now (so they
said), so I have to try to make the relationship as it is. I did the
following but I don't know how to put that admin should reference the
User login column: