Note that a single User can be associated with two connections. That means there is another association which exists between User (as the second user) and Connection which is not yet defined. I'll call it secondary_connection
.
class User
has_one :connection, :dependent => :destroy
has_one :secondary_connection, :class_name => 'Connection', :foreign_key => :second_user_id, :dependent => :destroy # Inverse of Connection second_user
has_one :second_user, :through => :connection, :class_name => 'User'
end