I have a Rails model with attributes X, Y, Z
I want to dynamically add P, Q attributes to this model while retrieving data. Attributes P, Q do not need constancy and are intended only for interface manipulations.
Is this even possible? I could achieve this by storing P, Q in another object and manipulating it along with the original model, but thought about asking here what could be a better way.
[rails 2.3.5, ruby 1.8.7]
source
share