I’ve just wasted a day fixing an issue that IMO shouldn’t be one. I’ve
got a workaround, but it smells as there’s more, and I would greatly
appreciate pointers what to watch out for.
The issue: I’ve got a model, and it had a method ‘all_noload’. It’s
homebrew, i.e. doesnt’ derive from ActiveRecord::Base. all_noload
simply enumerated a directory and made model objects of it.
Now in production, it didn’t work any more. Instead on an array, I got
. But not in development or test, i.e. it worked fine in them. Even
the precise code of all_noload, in the rails console, worked fine in
The ‘fix’ is to rename the method. Apparently it is related to
ActiveRecord initialization, since production was suddenly fine when I
removed the DB defintion (which of course didn’t get me far).
So, I suspect some rails magic is applied here with overly optimistic
So, is there a semi-official list of forbidden names in models or