A phone has many messages.
An email address has many messages.
A message either belongs to a phone, email, or neither. The belongs_to
association is optional.
The following associations seem to work fine for these relationships:
has_many :messages
has_many :messages
belongs_to :phones, :email
Is this okay or is there some proper way to specify a "can_belong_to" relationship?
It is completely correct unidirectional relation. Using both is sometimes called "curcular dependency" by some purists and may cause problems when using validates_associated.
From the other side using only has_many :messages
may be not enough when you want retrieve phone information from one message. Generally it is matter of convenience.