I know there are multiple threads concerning this topic and having read them I still can’t figure out the best approach for my situation. I have a Users model and I am using Devise for authentication. I am using quite a few Devise Modules which have added about 20 columns to my Users model. What I am thinking of doing is to add a separate Profile Model which will have about 18 columns.
The issue is that after sign up, the Devise Confirmable module redirects him to the HOME page and sends a confirmation link to his email. Once he confirms he is taken to the User Show page which is supposed to display his profile information.
I want to ensure that the User fills in his profile information before he is able to do anything on the site. All the Profile fields (About 18 of them) are mandatory and critical from an authorization standpoint and dictate what he can and cannot do. I am not sure how to go about this?
1) Should I just have a User model (this will mean 40 columns in Users table) and create a multi-step form?
2) Should I have a user model and a profile model?
3) If so, how can I make the user fill in his profile information before he confirms his account or right after?
4) Do I need a profile controller as well? I don’t know where to begin!
Actually its very simple. You can have different models for user and profile. You need to have some mechanism for flagging if the user has filled his profile information(something like
user.profile.nil?). Now you just need to create a before filter method which will redirect the user to create profile page if he does n’t have one.