I’m trying to add a mixin i wrote (ModelExtensions module in
lib/model_extensions.rb) to ActiveRecord::Base so that i can use the
methods in it in all my classes. (well actually there’s only a single
method in there at the moment)
I’ve added this to environment.rb (right at the bottom):
And the web server starts ok. But the mixin just doesn’t seem to work -
I get a “missing method” message.
So, i explicitly added the mixin to the required classes, with
at the top of the model file. Still no joy. Modules in lib should work
shouldn’t they? Can anyone see what i’m doing wrong?
thanks in advance