Initializers and automatically running code

I want to decorate ActiveRecord with a new method so that any classes
that inherit from it also have the method.

I’ve been told that initializers are the way to go, yet when I put a
file in initializers containing:

class << ActiveRecord::Base

def methodName(params)
end

end

The method doesn’t exist. While I realize this may be the simplest of
errors, I was going on some advice and I more or less would likely
benefit of having a full explanation of what’s going on with
initializers, “class <<” and how the best way to add methods to
ActiveRecord without actually modifying the ActiveRecord class itself…

On Jun 22, 5:18 pm, Alexander T. <rails-mailing-l…@andreas-
s.net> wrote:

end

Did you want to add a class method or were you intending to add an
instance method ?

Fred

Frederick C. wrote:

On Jun 22, 5:18�pm, Alexander T. <rails-mailing-l…@andreas-
s.net> wrote:

end

Did you want to add a class method or were you intending to add an
instance method ?

Fred

Instance. So any instances of ActiveRecord (my models) would have the
method.