Not even sure I have the right terminology here, Ruby/Rails syntax is
a bit of a challenge to get my brain wrapped around.
The majority of my models will have a timestamp/userstamp (updated_on,
updated_by) type thing. I haven’t really settled on an
authentication method yet, but was wondering how I might add this in a
DRY fashion to my models. I looked at the userstamp plugin, but I
don’t want foreign keys, and I want to learn how to roll this myself.
What’s the best ruby-esque way to achieve this?
Would I somehow construct a standard decorator for the model?
Would I subclass a base record somehow, check for the existance of the
fields and stuff them?
I know I could do this on a model by model basis using a before_update
type thing, but how do I DRY it?