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…