I have an Agent model which gets its attributes from the underlying database table. However for one particular controller action I would like to add some ‘temporary’ attributes to the Agent records before passing them on to the view.
Is this possible?
Yes, you can extend your models on the fly. For example:
In the view code, you can refer to
fooandbaras you would with other attributes.