goncalossilva/rails3_acts_as_paranoid — pull request #73 by garysweaver (2012-07-24 16:36:21+00:00)
Title: Fixing support for string type not to ignore records with column value other than the user-specified non-nil deleted_value

This is to resolve: https://github.com/goncalossilva/rails3_acts_as_paranoid/issues/72

Summary:

Fixing support for specifying a non-nil deleted_value with string type, so that if the column contains a value other than the deleted_value, the record won't be considered to be deleted. Also added tests for this.

Explanation:

With this patch you can have values in the column like "not deleted" and the record would not be considered deleted, but if the value was the same as the deleted_value like "deleted" then the record would be considered deleted.

I would hope this would be backwards compatible with how people were using it, although if they had assumed that if any value was in the column that the record should be considered deleted, then this patch would not be backwards compatible. However, since I had gotten the impression that records not marked with the deleted_value were not deleted, my assumption is that this patch makes it behave more like users of the gem would expect.