Reputation: 235
I have devise with single table inheritance,
Class User
end
class a < user
end
class b < user
end
class c < user
end
I wanted sign_up page for each class a,b,c and sign_in page. How to achieve in Devise!!!
How to create custom templates in user devise folder.
Upvotes: 1
Views: 84
Reputation: 2493
I am not sure about purposes you'd like to implement it to, but I think you should consider splitting your users' roles into separate models according to devise multiple models readme
and creating different views for them if you need it:
If you have more than one Devise model in your application (such as "User" and "Admin"), you will notice that Devise uses the same views for all models. Fortunately, Devise offers an easy way to customize views. All you need to do is set "config.scoped_views = true" inside "config/initializers/devise.rb". After doing so, you will be able to have views based on the role like "users/sessions/new" and "admins/sessions/new". If no view is found within the scope, Devise will use the default view at "devise/sessions/new"
Keep in mind that those models will have completely different routes. They do not and cannot share the same controller for sign in, sign out and so on. In case you want to have different roles sharing the same actions, we recommend you to use a role-based approach, by either providing a role column or using CanCan.
Upvotes: 1