]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/message.rb
Split the createuniquenodes query in two as MySQL was choosing a very
[rails.git] / app / models / message.rb
index 2c176a26ddc311ac764465a52a033353df57574b..039c8d30b9e3f31e2f0e4096eb84d57935dfa40c 100644 (file)
@@ -1,3 +1,4 @@
 class Message < ActiveRecord::Base
-  belongs_to :user
+  belongs_to :sender, :class_name => "User", :foreign_key => :from_user_id
+  belongs_to :recipient, :class_name => "User", :foreign_key => :to_user_id
 end