lwe/simple_enum — pull request #22 by mike-brown (2012-04-26 10:08:59+00:00)
Title: obj.human_(attr) method fails with an I18n-related exception is obj.(attr) is nil

I am unsure as to the exact behaviour that should occur in this case, but given that obj.(attr) and obj.(attr)_cd cleanly return nil if no value is set for the enum, I have followed this and made obj.human_(attr) simply return nil in the case where there is no value.

I have added a test to support this case as well.

If you would rather it not just silently return nil, a more descriptive exception should probably be thrown in this case than the one that currently is: "translation data can not be used with :count => 1"