Closed christhomson closed 9 years ago
@t6d
This gets around that issue we were running into, where we wanted to avoid calling nil? on the value if not absolutely necessary.
nil?
value
Note that the convert method already just returns if there's no converter: https://github.com/t6d/smart_properties/blob/7f04dd73270e7269f5a0cc3678c482688f45062b/lib/smart_properties.rb#L137.
convert
For now, I just updated the problematic class in our private repo to not use smart_properties because this fix seems pretty fragile. But I figured I'd open a PR here to get your thoughts anyway.
smart_properties
@t6d
This gets around that issue we were running into, where we wanted to avoid calling
nil?
on thevalue
if not absolutely necessary.Note that the
convert
method already just returns if there's no converter: https://github.com/t6d/smart_properties/blob/7f04dd73270e7269f5a0cc3678c482688f45062b/lib/smart_properties.rb#L137.For now, I just updated the problematic class in our private repo to not use
smart_properties
because this fix seems pretty fragile. But I figured I'd open a PR here to get your thoughts anyway.