has_many relationship

not much big of a deal, you should just re-do your code to use eager
loading to limit the reqests to the database.

@rec_messages = @user.received_messages.find :all, :include => :sender

<% @rec_messages.each |rec_message| %>
  <b>Message:</b> <%= rec_message.message %>
  <b>Sender:</b><%= rec.message.sender.name %>
<% end %>
Message belongs_to :sender so you can just access it like above...
the view code i suggest would work without eager loading too, it just
would hit the database again and again to get the sender info

dear sender,
i�m out of the office until may 29th.
your email will not be forwarded.
for urgent stuff please contact joern@fork.de
kind regards,

Now that i look at it again, you might want to specify the foreign key
on the belongs_to side too...

class Message < ActiveRecord::Base
  belongs_to :sender, :class_name => 'User', :foreign_key =>
  belongs_to :receiver, :class_name => 'User' :foreign_key =>

That should do the trick. At least i hope so :wink: