attr-encrypted/attr_encrypted — pull request #108 by tomciopp (2014-04-28 17:52:42+00:00)
Title: Change method of including attr_encrypted into a class

This would be a major breaking change, but one I think is necessary.

The offending line is `349`, currently this will pollute the global ruby namespace extending `AttrEncrypted` into every object.

This is not only a bad practice, but it guarantees that you will break someone else's code down the line. (This happened to me today) By using self.included you can add all of the logic of AttrEncrypted for each class individually, which is most likely what application writers want. The only change for the developer would be to add `include AttrEncrypted` to each model that should have encrypted attributes. Let me know what you think.