Only one "initialize" method allowed on AR objects?

Hi --

Thanks Mick.

I'm aware of the after_initialize method, but I just keep forgetting that ActiveRecord objects don't behave like normal objects.

I don't think there's anything in what you're seeing that wouldn't
also be the case of other Ruby objects. A given object only has one
interpretation of a given message at any given time. So "initialize"
will always mean "execute the one and only available method on my
radar called 'initialize'". If you write a new version that occludes
that method, then the new version will be called.

"Least surprise" my a** :). Strictly speaking, I suppose, Ruby is "least surprise", Rails is "opinionated." :slight_smile: But don't get me wrong, I really dig ActiveRecord.

The "Principle of Least Surprise" thing is somewhat deprecated, even
in "just Ruby" circles, because Matz got sick of people citing
violations of it as a way of describing things they didn't like :slight_smile:

David