Notes posted by nachokb

RSS feed
August 6, 2009
2 thanks

Second example is correct

@taryneast, the second example is correct. The receiver’s #size limits the result’s.


July 15, 2008
1 thank

Mapping Order

Something I always forget is the order in which each mapping should be specified.

The first item is the attribute name in the ActiveRecord model, and the second is the name of the attribute in the ValueObject (the writer uses it to read from the VO).

Furthermore, the order in which mapping pairs are specified should be the same as the order the attributes are specified in the ValueObject’s initialize method (for the reader to be able to instantiate a VO with the record’s values).