This makes it possible to filter invalid input values before they are passed
into the value-object (like empty strings). This behaviour is only relevant
if the :allow_nil options is set to true. Otherwise you will get
the resulting NoMethodError.
This pull-request is the same as #3421 but with the correct merge target.
allow the :converter Proc form composed_of to return nil
@rafaelfranca here is the new pull-request.
+1 ... This should be marked with the "ActiveRecord" label.
cc @tenderlove @jonleighton
FWIW, our use case here is to support nil with the money gem (which recommends using composed_of).
@rafaelfranca any progress on this one?
I'm not familiar with the Active Record internals. The implementation looks fine to me, but I don't want to get this without talk with @jonleighton or @tenderlove. I'll try to contact they today and give you an answer.