]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/friend.rb
Replace conditional comments with browser detection
[rails.git] / app / models / friend.rb
index 242b7425127f5f976bf2d08a158f3689c6cf3b1e..86da87b932ac99b332e95c864f346c12cc8a7ba4 100644 (file)
@@ -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