rails/rails — pull request #13061 by laurocaetano (2013-11-26 22:24:38+00:00)
Title: Fix bug when validating the uniqueness of an aliased attribute.

When validating the uniqueness of an aliased attribute, it was raising an error. To fix that, we have to check if the record being validated is an aliased attribute.

Closes #12402

/cc @rafaelfranca