Hi,
how do i do a relation for my users table ? The problem is following:
im building community site, where are users. every user can have a friend which is user too. so i created migration which adds to my users table new column user_id, and i also addes has_many relationship to User model.
so i want that both of them have reference to each other, they are friends right ? im not sure if i have to user belongs_to too...
1. is this ok ? 2. i dont want to use syntax like: user.users, but rather user.friends... how do i do this ? in rails im forced to create user_id column which is accesible through users property in my user model, this is convenction over cofiguration and i dont like it in this particular situation.
thanks in advance
regards