Fix uniqueness validation with Active Record

Refs #111