I am wondering if this could be a good idea to support the Object#extend
method for an ActiveRecord class.
Let’s say I have a customer (with a corresponding customer table in the
DB). At one point, this customer becomes a “BillableCustomer” (with data
in another table for billing information).
Wouldn’t it be nice to write:
customer.billingAddress = …
This way, you could implement Actor-Role patterns without the necessity
to create 2 classes representing the same logical object and an
association between the 2.
What do you think? Have you ever encountered that need? How did you deal