Use STI with Devise

0

I'm using (or trying to use) STI with Devise . I have the User model (I added the type attribute), which I want to be the devise model and two models that inherit from user. I chose this approach and not just roles because the models have particular fields to each one, but I will also use roles. I would like to know

1 - Will my routes be the same as the models they inherit from user? In this case devise_for :owner, devise_for :employee ?

2 - Is this approach appropriate?

3 - Overwrite controllers of devise (registration until then) to add custom fields , using STI should I still use nested_attributes on my form registration ?

    
asked by anonymous 04.09.2018 / 03:12

0 answers