X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7d52305640d647d97c7904e447ad48e6d0e2f694..35a2d66e1960b00e5ed0cecbe4263cdeedb1ad62:/app/models/friend.rb diff --git a/app/models/friend.rb b/app/models/friend.rb index 242b74251..86da87b93 100644 --- a/app/models/friend.rb +++ b/app/models/friend.rb @@ -1,4 +1,23 @@ +# == Schema Information +# +# Table name: friends +# +# id :integer not null, primary key +# user_id :integer not null +# friend_user_id :integer not null +# +# Indexes +# +# friends_user_id_idx (user_id) +# user_id_idx (friend_user_id) +# +# Foreign Keys +# +# friends_friend_user_id_fkey (friend_user_id => users.id) +# friends_user_id_fkey (user_id => users.id) +# + class Friend < ActiveRecord::Base - belongs_to :user - + belongs_to :befriender, :class_name => "User", :foreign_key => :user_id + belongs_to :befriendee, :class_name => "User", :foreign_key => :friend_user_id end