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.

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

#view
<% @rec_messages.each |rec_message| %>
  <b>Message:</b> <%= rec_message.message %>
  <b>Sender:</b><%= rec.message.sender.name %>
<br>
<% 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,
alexander

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 =>
"sender_id"
  belongs_to :receiver, :class_name => 'User' :foreign_key =>
"receiver_id"
end

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