Since I have the abstract class User
, and its subclasses Client Employee
and Admin
, I would like to render screens according to the chosen subclass.
users/_form.html.erb
: should contain a selection box with the subclasses of Users
, and as soon as a subclass is selected I can instantiate it or render its form.
Example: When user select
Colaborador
is rendered employees / _form.html.erb '.
Se alguém puder também dar uma dica ou exemplo de como implementar.