Closed tsubery closed 8 years ago
The assertion about the string "UNIQUE" is relevant only in the case of activerecord 3. The previous code did not work correctly because ActiveRecord::RecordNotUnique is actually a descendant of ActiveRecord::StatementInvalid.
Lets see how this one works :)
Green build: https://travis-ci.org/ckdake/setler/builds/97231732
The assertion about the string "UNIQUE" is relevant only in the case of activerecord 3. The previous code did not work correctly because ActiveRecord::RecordNotUnique is actually a descendant of ActiveRecord::StatementInvalid.