attr-encrypted/attr_encrypted — pull request #140 by saghaulor (2014-12-09 22:58:04+00:00)
Title: Refactor attr_encrypted to let ActiveRecord define attr_accessors for attrs that are not encrypted

This change removes unnecessary calls to define_attribute_methods and undefine_attribute_methods.

We should only be defining attribute methods for the attributes that we're encrypting, not for regular attribute accessors. Instead, we should let ActiveRecord handle creating those accessors. By prematurely defining the attribute methods when we were, it was causing issues like https://github.com/attr-encrypted/attr_encrypted/issues/11 and https://github.com/attr-encrypted/attr_encrypted/issues/46