Starting to feel more confident and code is DRYing up nicely, but I’ve
hit a brick wall here and hoping someone can help me.
I’ve got a module, TrustRanking, which extends a number of model’s
instance methods, and I want to extend their class methods too, but I
can seem to work out how to do it.
Simply including the module from the class works a treat for the
instance methods, but not for the class methods. I’ve tried a whole
bunch of things, putting the instance methods and class methods in
different submodules and calling them separately (and differently – is
it extend for the class methods?). Is anyone able to point me in the
right direction. Have tried looking at a couple of plug-ins
(acts_as_taggable), but it’s not helping. Maybe I’m just tired… or