Was an absolute lifesaver when I was trying to add additional registration information to my sign-up page.
Judging by the number of different StackOverflow questions, there are a lot of people trying to do this, and a lot of confusion. Here is how I did it, and hopefully it helps you.
I have a User and a Verifier model. What I want to do is create a new Verifier every time I create a new user, and pass in the user.id for the User into the verifier.user_id so that they are mapped together.
In order to do this I want to not really override but add additional functionality to the existing devise controller that handles when new users are created (and destroyed). So I need to access the RegistrationsController#Create function in devise.
First thing is to create a new folder in the ‘app/controllers‘ folder where we can put my custom controller. I called mine ‘app/controllers/my_devise‘. Then create a new file in this folder…
View original post 534 more words