Hope you’re having a good weekend.
I have a couple of models that share a lot of similar validation so I
figured this would be a good opportunity to DRY my code up.
lets say for example:
class Squirrel < ActiveRecode::Base
class Badger < ActiveRecode::Base
what I’ve been trying to do is add a module in /lib called
and then include this module in the models that require it. I’ve also
tried various combinations with ‘eval’ and ‘send’ etc.
The validations aren’t called
Can anyone explain why this isn’t working and if it’s possbile to re-
use validations like this?