I want to access User.messages, because I need it for the destroy-
action -> User.messages.find(params[:id])
You want a single association that covers both sent and received
messages ? AFAIL there is no way to get an association to do that
(although you could construct a named scope that did).
You'd have to put the scope on Message class if you want it to return
messages ie
named_scope :for_user, lambda {|u| :conditions => ["sender_id = ? or
received_id = ?", u,u]}
Then Message.for_user(bob) returns a scope for bob's messages. You
could define a messages method on user to make this flow slightly
nicer ie