Instead of playing with booleans to change objects behaviors, what you guys think about STI?
Personally, I'd made the Guest class as a subclass of User. It's then possible to override behavior (validations, methods, etc.) without any ugly if. It sounds more OO to me. Am I right?
Instead of playing with booleans to change objects behaviors, what you guys think about STI?
Personally, I'd made the
Guest
class as a subclass ofUser
. It's then possible to override behavior (validations, methods, etc.) without any uglyif
. It sounds more OO to me. Am I right?