]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/message.rb
Only include the home link if the user is logged in.
[rails.git] / app / models / message.rb
index 590e3e35780308425fe7c61c46e934d7a16ac70d..039c8d30b9e3f31e2f0e4096eb84d57935dfa40c 100644 (file)
@@ -1,2 +1,4 @@
 class Message < ActiveRecord::Base
 class Message < ActiveRecord::Base
+  belongs_to :sender, :class_name => "User", :foreign_key => :from_user_id
+  belongs_to :recipient, :class_name => "User", :foreign_key => :to_user_id
 end
 end