rails/rails — pull request #7972 by scottwillson (2012-10-17 02:07:18+00:00)
Title: Fix bug with presence validation of associations.

A recent commit to edge Rails rails/rails@1fab518
correctly considers marked for destruction associations as blank, but
incorrectly adds a duplicate error for blank has_one and belongs_to associations.

This pull request fixes this.

Example:
Boy.validates_presence_of(:face)
b = Boy.new
b.errors.full_messages

["Face can't be blank", "Face can't be blank"]

Fumbled the git squash so opened a second pull request.