Why is overriding ActiveRecord :: Base.initialize wrong?

In several places, I have seen claims that overriding ActiveRecord :: Base.initialize is wrong, because it may not always be called:

With any versions of ActiveRecord (3.0+), is this still true? If so, what are the specific circumstances under which it is not called, when can we expect it to be?

+5
source share
1 answer

This is not what it will not be called, it is what it already is initialize, c ActiveRecord::Base.

super? , , . Rails, ? . . . Magic 8-Ball .

, .

+2

All Articles