Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8997589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:54:35+00:00 2026-06-15T23:54:35+00:00

I’m trying to set up 2 slightly different signup processes for my User child

  • 0

I’m trying to set up 2 slightly different signup processes for my User child classes – Member and Partner. I want to make it so:

/users/sign_up signs up a User as a Member (so I have a hidden field in there with the value ‘Member’) and it works like a charm.

But also I want:

/users/partner/sign_up to provide a slightly different form that ascribes them the value ‘Partner’.

I specifically want this achieved with 2 separate URLs, so I can send these different types of user a different link to sign up with.

I’m using Devise for my authentication system.

I’m pretty sure I should generate a separate controller, something like partner_registrations_controller and have it inherit from devise, but I have no idea what code should then go in the controller.

I also think I need to create a new folder ‘partner_registrations’ within the views/users folder, where I would have the specific ‘new.html.erb’ form.

And I finally I know I need to do something with the routes, like:

  devise_for :users, :controllers => { :registrations => :registrations } do
      get 'users/partner/sign_up', to: 'devise/registrations#new'
  end

I’ve read this wiki page on github: https://github.com/plataformatec/devise/wiki/How-To:-Customize-routes-to-user-registration-pages but I’m non the wiser for it.

Any help is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:54:36+00:00Added an answer on June 15, 2026 at 11:54 pm

    I figured it out, so thought I’d post the answer in case anyone else finds it useful in the future:

    Routes file:

      devise_scope :user do
        get 'sign_up', to: 'members#new', controller: {registrations: "members"}
        get 'partners/sign_up', to: 'content_partners#new', controller: {registrations: "content_partners"}
      end
      devise_for :users, controllers: {registrations: :registrations}
    

    I created 2 separate controllers for each child class, with basically the same new and create actions as given by devise:

    class MembersController < Devise::RegistrationsController
      def new
        resource = build_resource({})
        respond_with resource
      end
    
      # POST /resource
      def create
        build_resource
    
        if resource.save
          if resource.active_for_authentication?
            set_flash_message :notice, :signed_up if is_navigational_format?
            sign_up(resource_name, resource)
            respond_with resource, :location => after_sign_up_path_for(resource)
          else
            set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_navigational_format?
            expire_session_data_after_sign_in!
            respond_with resource, :location => after_inactive_sign_up_path_for(resource)
          end
        else
          clean_up_passwords resource
          respond_with resource
        end
      end
    end
    

    I just replaced ‘Members’ for ‘ContentPartners’ in the controller for the other child class.

    I then created 2 new folders in the Views/Users folder – watch out for the gotcha that got me, they have to be pluralized too – so /members and /content_partners. Then in each folder I created a unique ‘new.html.erb’ file.

    That’s it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to render a haml file in a javascript response like so:
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm interested in microtypography issues on the web. I want a tool to fix:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.