Andy Watts wrote:
Added STI and it's messed with my validates_uniqueness.
I was hoping a validate_uniqueness in the base class would validate a
field regardless of the derived classes....but it seems not to be.
Any ideas how I can enforce the below uniqueness across all inherited
validate_uniqueness_of :xyz_id , :scope => "user_id"
This is an as yet unfixed problem with Active Record
The quick fix I use is to change the following line
removing "record.class", leaving a plain find.