When comparing certain elements, the object ids differ due to a slight change in the updated at. When checking if two objects are the same. it now uses the attributes without the updated_at column.
For checking uniqueness, default_scope should be ignored, if the user does wish to scope in some way, they should use the conditions hash.
Sometimes, only certain types of a particular model will be unique, for example, lets say you have public and private organisations and you only wish the validate against public organisations. The following can be added to the uniqueable call to ensure this happens: uniqueable :alias, :conditions => ["public = ?", true] Assuming a boolean public field on the organisation.
When passing a nil value with the case_sensitive => false option, when downcase is called, a NoMethodError was raised. Downcase is now only called if the value is a string.
To enable multiple models to be checked for uniqueness, a model can include the Uniqueable module. When this module is included, a new method is added to the Model called uniqueable_checks. This contains all the checks for the system, enabling any model to be checked against any other model. The uniqueable class method allows attributes to be specified to check for uniqueness. Also included * Checking groups * Case sensitivity