The restrict_with_error option in a has_many relationship will add an error message to the "parent" when an existing association exists.
restrict_with_error
has_many