All threads / Multi form devise registration setup with admin approval

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Multi form devise registration setup with admin approval

Roman Storm asked in Gems / Libraries

Scenario:
Implement a registration with multiple steps and after all is complete, display "We will approve your application" at the end and wait when an internal admin (only to owners of the app) will approve the account

For implementing admin thing is documented here:
https://github.com/plataformatec/devise/wiki/How-To:-Require-admin-to-activate-account-before-sign_in

but I can't see good pattern for implementing multi step sign up

If you're using Devise, as long as you do the email/password registration as the first step, that makes it pretty easy. You can use like https://github.com/schneems/wicked to setup the rest of the steps.

I would just put a before_action around all your controllers so that it forces your user to an "awaiting approval" page until they are approved. You can still let them log in and view their account but they won't be able to do anything.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 33,665+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.