Fantastic Models and Where to Find Them - acessoajustica/acessoajustica GitHub Wiki

If you don't know the reference, stop everything and watch it!

The Ability model is used by the CanCan Gem which is in charge of PERMISSIONS. The 'manage' permission is the highest one.

The Atendimento model is by far the most complex and has several interdependencies:

Also, the method canTakeMe? describes Atendimentos which are not assigned to an Estagiario.

The Cliente model is an specialization of Pessoa, which we still will get to here, it also has the following interdepencies:

The Estagiario model is a specialization of user and each Estagiario can be a Diretor, that's why there's the method is_diretor. We may want to check the ERD.